Skip to content

Commit

Permalink
removed xml dependency and cleaned up nuget info
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkis117 committed Dec 12, 2016
1 parent 6cd17d6 commit 14942d5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions .vs/restore.dg
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#:C:\Users\clark\Source\Repos\Mime-Detective4\src\Mime-Detective\Mime-Detective.xproj
#:C:\Users\clark\Source\Repos\Mime-Detective4\test\Mime-Detective.Tests\Mime-Detective.Tests.xproj
C:\Users\clark\Source\Repos\Mime-Detective4\test\Mime-Detective.Tests\Mime-Detective.Tests.xproj|C:\Users\clark\Source\Repos\Mime-Detective4\src\Mime-Detective\Mime-Detective.xproj
4 changes: 2 additions & 2 deletions src/Mime-Detective/MimeDetective.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static FileType LearnMimeType(FileInfo file, string mimeType, int headerS
return new FileType(data, file.Extension, mimeType, offset);
}

public static FileType LearnMimeType(FileInfo first, FileInfo second, string mimeType, int maxHeaderSize = 12, int minMatches = 2, int maxNonMatch = 3)
public static FileType? LearnMimeType(FileInfo first, FileInfo second, string mimeType, int maxHeaderSize = 12, int minMatches = 2, int maxNonMatch = 3)
{
byte?[] header = null;

Expand Down Expand Up @@ -105,7 +105,7 @@ public static FileType LearnMimeType(FileInfo first, FileInfo second, string mim
}
else
{
return new FileType(null, null, null);
return null;
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/Mime-Detective/MimeTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ EML is also used by Outlook Express and QuickMail.

#region Main Methods

/*
public static void SaveToXmlFile(string path)
{
using (FileStream file = File.OpenWrite(path))
Expand All @@ -233,6 +234,7 @@ public static FileType[] LoadFromXmlFile(string path)
//Array.Copy(tmpTypes, 0, Types, typeOrgLenth, tmpTypes.Length);
}
}
*/

/*
public static FileType GetFileType(FileInfo file)
Expand Down
11 changes: 5 additions & 6 deletions src/Mime-Detective/project.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"packOptions": {
"summary": "Mime-Detective",
"summary": "Mime-Detective Class Library, .NET Core Fork",
"tags": [ "mime", "mime-type", "content-type", "contenttype" ],
"owners": [ "clarkis117" ],
"projectUrl": "https://github.com/clarkis117/Mime-Detective",
"licenseUrl": "https://mit-license.org/",
"licenseUrl": "https://github.com/clarkis117/Mime-Detective/blob/master/LICENSE",
"repository": {
"type": "git",
"url": "https://github.com/clarkis117/Mime-Detective.git"
Expand All @@ -14,12 +14,11 @@
"name": "Mime-Detective",
"title": "Mime-Detective",
"version": "0.0.1",
"description": "Mime-Detective Class Library .NET Core Fork",
"authors": [ "Joshua Clark" ],
"description": "Mime-Detective Class Library, .NET Core Fork",
"authors": [ "Mime-Detective Collaborators" ],

"dependencies": {
"NETStandard.Library": "1.6.0",
"System.Xml.XmlSerializer": "4.0.11"
"NETStandard.Library": "1.6.0"
},

"frameworks": {
Expand Down

0 comments on commit 14942d5

Please sign in to comment.