diff --git a/ArchiSteamFarm/Debugging.cs b/ArchiSteamFarm/Debugging.cs index 2977b049f..e02a8edf8 100644 --- a/ArchiSteamFarm/Debugging.cs +++ b/ArchiSteamFarm/Debugging.cs @@ -19,17 +19,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -using System.Diagnostics.CodeAnalysis; using SteamKit2; namespace ArchiSteamFarm { internal static class Debugging { #if DEBUG - [SuppressMessage("ReSharper", "ConvertToConstant.Global")] - internal static readonly bool IsDebugBuild = true; + internal static bool IsDebugBuild => true; #else - [SuppressMessage("ReSharper", "ConvertToConstant.Global")] - internal static readonly bool IsDebugBuild = false; + internal static bool IsDebugBuild => false; #endif internal static bool IsUserDebugging => IsDebugBuild || Program.GlobalConfig.Debug; diff --git a/ArchiSteamFarm/SharedInfo.cs b/ArchiSteamFarm/SharedInfo.cs index 81ba7149a..80e11fba0 100644 --- a/ArchiSteamFarm/SharedInfo.cs +++ b/ArchiSteamFarm/SharedInfo.cs @@ -20,7 +20,6 @@ // limitations under the License. using System; -using System.Diagnostics.CodeAnalysis; using System.Reflection; namespace ArchiSteamFarm { @@ -64,11 +63,9 @@ namespace ArchiSteamFarm { private const string SourceVariant = "source"; - [SuppressMessage("ReSharper", "ConvertToConstant.Global")] - internal static readonly bool IsCustomBuild = Variant == SourceVariant; - - internal static readonly Guid ModuleVersion = Assembly.GetEntryAssembly().ManifestModule.ModuleVersionId; - internal static readonly string PublicIdentifier = AssemblyName + (IsCustomBuild ? "-custom" : ""); - internal static readonly Version Version = Assembly.GetEntryAssembly().GetName().Version; + internal static bool IsCustomBuild => Variant == SourceVariant; + internal static Guid ModuleVersion => Assembly.GetEntryAssembly().ManifestModule.ModuleVersionId; + internal static string PublicIdentifier => AssemblyName + (IsCustomBuild ? "-custom" : ""); + internal static Version Version => Assembly.GetEntryAssembly().GetName().Version; } } \ No newline at end of file diff --git a/ArchiSteamFarm/Utilities.cs b/ArchiSteamFarm/Utilities.cs index 6dde439db..b9b163e7f 100644 --- a/ArchiSteamFarm/Utilities.cs +++ b/ArchiSteamFarm/Utilities.cs @@ -32,6 +32,7 @@ using Humanizer.Localisation; namespace ArchiSteamFarm { internal static class Utilities { + // Normally we wouldn't need to use this singleton, but we want to ensure decent randomness across entire program's lifetime private static readonly Random Random = new Random(); internal static string GetArgsString(string[] args, byte argsToSkip, string delimiter = " ") {