diff --git a/BinaryObjectScanner/CheckDictionary.cs b/BinaryObjectScanner/CheckDictionary.cs index 1891e415..de64a049 100644 --- a/BinaryObjectScanner/CheckDictionary.cs +++ b/BinaryObjectScanner/CheckDictionary.cs @@ -1,7 +1,7 @@ namespace BinaryObjectScanner { /// - /// Represents a mapping from file to a set of protections + /// Represents a mapping from checker to detected protection /// #if NET20 || NET35 public class CheckDictionary : System.Collections.Generic.Dictionary where T : notnull { } diff --git a/BinaryObjectScanner/FileType/Executable.cs b/BinaryObjectScanner/FileType/Executable.cs index 84722b38..e761cf8a 100644 --- a/BinaryObjectScanner/FileType/Executable.cs +++ b/BinaryObjectScanner/FileType/Executable.cs @@ -1,7 +1,4 @@ using System; -#if NET40_OR_GREATER || NETCOREAPP -using System.Collections.Concurrent; -#endif using System.Collections.Generic; using System.IO; using System.Linq; @@ -216,11 +213,7 @@ namespace BinaryObjectScanner.FileType } // Create the output dictionary -#if NET20 || NET35 - var protections = new Dictionary(); -#else - var protections = new ConcurrentDictionary(); -#endif + var protections = new CheckDictionary(); // Iterate through all checks #if NET20 || NET35 @@ -275,11 +268,7 @@ namespace BinaryObjectScanner.FileType public IDictionary RunLinearExecutableChecks(string file, Stream stream, LinearExecutable lex, bool includeDebug) { // Create the output dictionary -#if NET20 || NET35 - var protections = new Dictionary(); -#else - var protections = new ConcurrentDictionary(); -#endif + var protections = new CheckDictionary(); // Iterate through all checks #if NET20 || NET35 @@ -334,11 +323,7 @@ namespace BinaryObjectScanner.FileType public IDictionary RunMSDOSExecutableChecks(string file, Stream stream, MSDOS mz, bool includeDebug) { // Create the output dictionary -#if NET20 || NET35 - var protections = new Dictionary(); -#else - var protections = new ConcurrentDictionary(); -#endif + var protections = new CheckDictionary(); // Iterate through all checks #if NET20 || NET35 @@ -393,11 +378,7 @@ namespace BinaryObjectScanner.FileType public IDictionary RunNewExecutableChecks(string file, Stream stream, NewExecutable nex, bool includeDebug) { // Create the output dictionary -#if NET20 || NET35 - var protections = new Dictionary(); -#else - var protections = new ConcurrentDictionary(); -#endif + var protections = new CheckDictionary(); // Iterate through all checks #if NET20 || NET35 @@ -452,11 +433,7 @@ namespace BinaryObjectScanner.FileType public IDictionary RunPortableExecutableChecks(string file, Stream stream, PortableExecutable pex, bool includeDebug) { // Create the output dictionary -#if NET20 || NET35 - var protections = new Dictionary(); -#else - var protections = new ConcurrentDictionary(); -#endif + var protections = new CheckDictionary(); // Iterate through all checks #if NET20 || NET35