From f5b1868eecf58129b4286ba2c2d6bec1bfcc335f Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sat, 6 Sep 2025 12:40:06 -0400 Subject: [PATCH] Move some things around --- BinaryObjectScanner.Test/{ => Data}/FactoryTests.cs | 3 ++- .../{ => Data}/ProtectionDictionaryTests.cs | 3 ++- BinaryObjectScanner/{ => Data}/CheckDictionary.cs | 6 +++--- BinaryObjectScanner/{ => Data}/Factory.cs | 4 ++-- BinaryObjectScanner/{ => Data}/ProtectionDictionary.cs | 2 +- ProtectionScan/Program.cs | 1 + 6 files changed, 11 insertions(+), 8 deletions(-) rename BinaryObjectScanner.Test/{ => Data}/FactoryTests.cs (96%) rename BinaryObjectScanner.Test/{ => Data}/ProtectionDictionaryTests.cs (94%) rename BinaryObjectScanner/{ => Data}/CheckDictionary.cs (68%) rename BinaryObjectScanner/{ => Data}/Factory.cs (96%) rename BinaryObjectScanner/{ => Data}/ProtectionDictionary.cs (99%) diff --git a/BinaryObjectScanner.Test/FactoryTests.cs b/BinaryObjectScanner.Test/Data/FactoryTests.cs similarity index 96% rename from BinaryObjectScanner.Test/FactoryTests.cs rename to BinaryObjectScanner.Test/Data/FactoryTests.cs index cbf101cc..7257660c 100644 --- a/BinaryObjectScanner.Test/FactoryTests.cs +++ b/BinaryObjectScanner.Test/Data/FactoryTests.cs @@ -1,10 +1,11 @@ using System; using System.Collections.Generic; +using BinaryObjectScanner.Data; using BinaryObjectScanner.Interfaces; using SabreTools.Serialization.Wrappers; using Xunit; -namespace BinaryObjectScanner.Test +namespace BinaryObjectScanner.Test.Data { public class FactoryTests { diff --git a/BinaryObjectScanner.Test/ProtectionDictionaryTests.cs b/BinaryObjectScanner.Test/Data/ProtectionDictionaryTests.cs similarity index 94% rename from BinaryObjectScanner.Test/ProtectionDictionaryTests.cs rename to BinaryObjectScanner.Test/Data/ProtectionDictionaryTests.cs index d93dc25c..3136b6d6 100644 --- a/BinaryObjectScanner.Test/ProtectionDictionaryTests.cs +++ b/BinaryObjectScanner.Test/Data/ProtectionDictionaryTests.cs @@ -1,7 +1,8 @@ using System.Collections.Generic; +using BinaryObjectScanner.Data; using Xunit; -namespace BinaryObjectScanner.Test +namespace BinaryObjectScanner.Test.Data { public class ProtectionDictionaryTests { diff --git a/BinaryObjectScanner/CheckDictionary.cs b/BinaryObjectScanner/Data/CheckDictionary.cs similarity index 68% rename from BinaryObjectScanner/CheckDictionary.cs rename to BinaryObjectScanner/Data/CheckDictionary.cs index 84d1146d..c2806168 100644 --- a/BinaryObjectScanner/CheckDictionary.cs +++ b/BinaryObjectScanner/Data/CheckDictionary.cs @@ -1,12 +1,12 @@ -namespace BinaryObjectScanner +namespace BinaryObjectScanner.Data { /// /// Represents a mapping from checker to detected protection /// #if NET20 || NET35 - public class CheckDictionary : System.Collections.Generic.Dictionary where T : notnull + internal class CheckDictionary : System.Collections.Generic.Dictionary where T : notnull #else - public class CheckDictionary : System.Collections.Concurrent.ConcurrentDictionary where T : notnull + internal class CheckDictionary : System.Collections.Concurrent.ConcurrentDictionary where T : notnull #endif { /// diff --git a/BinaryObjectScanner/Factory.cs b/BinaryObjectScanner/Data/Factory.cs similarity index 96% rename from BinaryObjectScanner/Factory.cs rename to BinaryObjectScanner/Data/Factory.cs index c83df34a..8b0b4e71 100644 --- a/BinaryObjectScanner/Factory.cs +++ b/BinaryObjectScanner/Data/Factory.cs @@ -1,9 +1,9 @@ using SabreTools.Serialization.Interfaces; using SabreTools.Serialization.Wrappers; -namespace BinaryObjectScanner +namespace BinaryObjectScanner.Data { - public static class Factory + internal static class Factory { /// /// Create an instance of a detectable based on file type diff --git a/BinaryObjectScanner/ProtectionDictionary.cs b/BinaryObjectScanner/Data/ProtectionDictionary.cs similarity index 99% rename from BinaryObjectScanner/ProtectionDictionary.cs rename to BinaryObjectScanner/Data/ProtectionDictionary.cs index 69f21777..153272c1 100644 --- a/BinaryObjectScanner/ProtectionDictionary.cs +++ b/BinaryObjectScanner/Data/ProtectionDictionary.cs @@ -5,7 +5,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; -namespace BinaryObjectScanner +namespace BinaryObjectScanner.Data { /// /// Represents a mapping from file to a set of protections diff --git a/ProtectionScan/Program.cs b/ProtectionScan/Program.cs index 4d6ba1a3..6baa6302 100644 --- a/ProtectionScan/Program.cs +++ b/ProtectionScan/Program.cs @@ -1,6 +1,7 @@ using System; using System.IO; using BinaryObjectScanner; +using BinaryObjectScanner.Data; namespace ProtectionScan {