mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Misc
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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 = " ") {
|
||||
|
||||
Reference in New Issue
Block a user