diff --git a/BurnOutSharp/Options.cs b/BurnOutSharp/Options.cs
new file mode 100644
index 00000000..586e96df
--- /dev/null
+++ b/BurnOutSharp/Options.cs
@@ -0,0 +1,33 @@
+namespace BurnOutSharp
+{
+ ///
+ /// Scanning options
+ ///
+ public class Options
+ {
+ ///
+ /// Determines whether archives are decompressed and scanned
+ ///
+ public bool ScanArchives { get; set; }
+
+ ///
+ /// Determines if content matches are used or not
+ ///
+ public bool ScanContents { get; set; }
+
+ ///
+ /// Determines if packers are counted as detected protections or not
+ ///
+ public bool ScanPackers { get; set; }
+
+ ///
+ /// Determines if path matches are used or not
+ ///
+ public bool ScanPaths { get; set; }
+
+ ///
+ /// Determines if debug information is output or not
+ ///
+ public bool IncludeDebug { get; set; }
+ }
+}
diff --git a/BurnOutSharp/Scanner.cs b/BurnOutSharp/Scanner.cs
index 09e93135..1e3e3e9a 100644
--- a/BurnOutSharp/Scanner.cs
+++ b/BurnOutSharp/Scanner.cs
@@ -15,30 +15,25 @@ namespace BurnOutSharp
{
#region Options
- ///
- /// Determines whether archives are decompressed and scanned
- ///
- public bool ScanArchives { get; private set; }
+ ///
+ public bool ScanArchives => options?.ScanArchives ?? false;
+
+ ///
+ public bool ScanContents => options?.ScanContents ?? false;
+
+ ///
+ public bool ScanPackers => options?.ScanPackers ?? false;
+
+ ///
+ public bool ScanPaths => options?.ScanPaths ?? false;
+
+ ///
+ public bool IncludeDebug => options?.IncludeDebug ?? false;
///
- /// Determines if content matches are used or not
+ /// Options object for configuration
///
- public bool ScanContents { get; private set; }
-
- ///
- /// Determines if packers are counted as detected protections or not
- ///
- public bool ScanPackers { get; private set; }
-
- ///
- /// Determines if path matches are used or not
- ///
- public bool ScanPaths { get; private set; }
-
- ///
- /// Determines if debug information is output or not
- ///
- public bool IncludeDebug { get; private set; }
+ private readonly Options options;
#endregion
@@ -58,11 +53,15 @@ namespace BurnOutSharp
/// Optional progress callback
public Scanner(bool scanArchives, bool scanContents, bool scanPackers, bool scanPaths, bool includeDebug, IProgress fileProgress = null)
{
- ScanArchives = scanArchives;
- ScanContents = scanContents;
- ScanPackers = scanPackers;
- ScanPaths = scanPaths;
- IncludeDebug = includeDebug;
+ this.options = new Options
+ {
+ ScanArchives = scanArchives,
+ ScanContents = scanContents,
+ ScanPackers = scanPackers,
+ ScanPaths = scanPaths,
+ IncludeDebug = includeDebug,
+ };
+
this.fileProgress = fileProgress;
// Register the codepages