From 0fc7ce2e0771e0f6c3f24d28ce3b7525d1e63a38 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 4 Nov 2024 14:10:16 -0500 Subject: [PATCH] Simplify code in Extractor --- Test/Extractor.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Test/Extractor.cs b/Test/Extractor.cs index c9dcf9f0..b52e057f 100644 --- a/Test/Extractor.cs +++ b/Test/Extractor.cs @@ -9,13 +9,10 @@ namespace Test { #region Options - /// - public bool IncludeDebug => _options?.IncludeDebug ?? false; - /// - /// Options object for configuration + /// Determines if debug information is output or not /// - private readonly BinaryObjectScanner.Options _options; + private bool _includeDebug; #endregion @@ -25,10 +22,7 @@ namespace Test /// Enable including debug information public Extractor(bool includeDebug) { - _options = new BinaryObjectScanner.Options - { - IncludeDebug = includeDebug, - }; + _includeDebug = includeDebug; #if NET462_OR_GREATER || NETCOREAPP // Register the codepages @@ -83,7 +77,7 @@ namespace Test } catch (Exception ex) { - if (IncludeDebug) Console.WriteLine(ex); + if (_includeDebug) Console.WriteLine(ex); return; }