diff --git a/BurnOutSharp/Factory.cs b/BinaryObjectScanner/Factory.cs similarity index 94% rename from BurnOutSharp/Factory.cs rename to BinaryObjectScanner/Factory.cs index ca42142c..4bf53da3 100644 --- a/BurnOutSharp/Factory.cs +++ b/BinaryObjectScanner/Factory.cs @@ -1,14 +1,18 @@ using BinaryObjectScanner.Interfaces; using BinaryObjectScanner.Utilities; -namespace BurnOutSharp +namespace BinaryObjectScanner { - internal static class Factory + public static class Factory { /// /// Create an instance of a detectable based on file type /// +#if NET48 public static IDetectable CreateDetectable(SupportedFileType fileType) +#else + public static IDetectable? CreateDetectable(SupportedFileType fileType) +#endif { switch (fileType) { @@ -29,7 +33,11 @@ namespace BurnOutSharp /// /// Create an instance of an extractable based on file type /// +#if NET48 public static IExtractable CreateExtractable(SupportedFileType fileType) +#else + public static IExtractable? CreateExtractable(SupportedFileType fileType) +#endif { switch (fileType) { diff --git a/BurnOutSharp/Options.cs b/BinaryObjectScanner/Options.cs similarity index 96% rename from BurnOutSharp/Options.cs rename to BinaryObjectScanner/Options.cs index 559682b9..9a9af387 100644 --- a/BurnOutSharp/Options.cs +++ b/BinaryObjectScanner/Options.cs @@ -1,4 +1,4 @@ -namespace BurnOutSharp +namespace BinaryObjectScanner { /// /// Scanning options diff --git a/BurnOutSharp/ProtectionProgress.cs b/BinaryObjectScanner/ProtectionProgress.cs similarity index 77% rename from BurnOutSharp/ProtectionProgress.cs rename to BinaryObjectScanner/ProtectionProgress.cs index 6330e740..e3f23837 100644 --- a/BurnOutSharp/ProtectionProgress.cs +++ b/BinaryObjectScanner/ProtectionProgress.cs @@ -1,4 +1,4 @@ -namespace BurnOutSharp +namespace BinaryObjectScanner { /// /// Struct representing protection scanning progress @@ -8,17 +8,29 @@ /// /// Filename to report progress for /// +#if NET48 public string Filename { get; private set; } +#else + public string Filename { get; init; } +#endif /// /// Value between 0 and 1 representign the percentage completed /// +#if NET48 public float Percentage { get; private set; } +#else + public float Percentage { get; init; } +#endif /// /// Protection information to report /// +#if NET48 public string Protection { get; private set; } +#else + public string Protection { get; init; } +#endif public ProtectionProgress(string filename, float percentage, string protection) { diff --git a/BurnOutSharp/Scanner.cs b/BurnOutSharp/Scanner.cs index 9cd9b0a8..653f3689 100644 --- a/BurnOutSharp/Scanner.cs +++ b/BurnOutSharp/Scanner.cs @@ -5,6 +5,7 @@ using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; +using BinaryObjectScanner; using BinaryObjectScanner.FileType; using BinaryObjectScanner.Interfaces; using BinaryObjectScanner.Utilities; diff --git a/Test/Program.cs b/Test/Program.cs index b237fc4c..b146d2ac 100644 --- a/Test/Program.cs +++ b/Test/Program.cs @@ -1,5 +1,6 @@ using System; using System.Text; +using BinaryObjectScanner; using BurnOutSharp; namespace Test diff --git a/Test/Protector.cs b/Test/Protector.cs index cd0e5ba0..e047316d 100644 --- a/Test/Protector.cs +++ b/Test/Protector.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Concurrent; using System.IO; using System.Linq; +using BinaryObjectScanner; using BurnOutSharp; namespace Test