This commit is contained in:
JustArchi
2018-04-23 05:53:58 +02:00
parent 670415a543
commit bafdb93a0c
3 changed files with 7 additions and 12 deletions

View File

@@ -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;

View File

@@ -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;
}
}

View File

@@ -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 = " ") {