From 7f0fec7eb02587d16ca3de47e2d1d8fe9d087b94 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Fri, 21 Oct 2016 21:09:43 +0200 Subject: [PATCH] Remove obsolete workaround and require Mono 4.6+ --- ArchiSteamFarm/GlobalConfig.cs | 7 +------ ArchiSteamFarm/Runtime.cs | 27 +-------------------------- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/ArchiSteamFarm/GlobalConfig.cs b/ArchiSteamFarm/GlobalConfig.cs index b05b77712..449a04b7d 100644 --- a/ArchiSteamFarm/GlobalConfig.cs +++ b/ArchiSteamFarm/GlobalConfig.cs @@ -79,7 +79,7 @@ namespace ArchiSteamFarm { internal readonly byte IdleFarmingPeriod = 3; [JsonProperty(Required = Required.DisallowNull)] - internal byte FarmingDelay { get; private set; } = DefaultFarmingDelay; + internal readonly byte FarmingDelay = DefaultFarmingDelay; [JsonProperty(Required = Required.DisallowNull)] internal readonly byte LoginLimiterDelay = 10; @@ -158,11 +158,6 @@ namespace ArchiSteamFarm { return null; } - if ((globalConfig.FarmingDelay > 5) && Runtime.RequiresWorkaroundForMonoBug41701()) { - Logging.LogGenericWarning("Your Mono runtime is affected by bug 41701, FarmingDelay of " + globalConfig.FarmingDelay + " is not possible - value of 5 will be used instead"); - globalConfig.FarmingDelay = 5; - } - if (globalConfig.HttpTimeout == 0) { Logging.LogGenericWarning("Configured HttpTimeout is invalid: " + globalConfig.HttpTimeout); return null; diff --git a/ArchiSteamFarm/Runtime.cs b/ArchiSteamFarm/Runtime.cs index 42f335c82..545902a5b 100644 --- a/ArchiSteamFarm/Runtime.cs +++ b/ArchiSteamFarm/Runtime.cs @@ -69,7 +69,7 @@ namespace ArchiSteamFarm { return false; } - Version minMonoVersion = new Version(4, 4); + Version minMonoVersion = new Version(4, 6); if (monoVersion >= minMonoVersion) { Logging.LogGenericInfo("Your Mono version is OK. Required: " + minMonoVersion + " | Found: " + monoVersion); @@ -102,31 +102,6 @@ namespace ArchiSteamFarm { } } - // TODO: Remove me once Mono 4.6 is released - internal static bool RequiresWorkaroundForMonoBug41701() { - // Mono only, https://bugzilla.xamarin.com/show_bug.cgi?id=41701 - if (!IsRunningOnMono) { - return false; - } - - Version monoVersion = GetMonoVersion(); - - // The issue affects Mono versions from 4.3.2, 4.4.0 to 4.4.2 (inclusive) and from 4.5.0 to 4.5.2 (inclusive) - if (monoVersion?.Major != 4) { - return false; - } - - switch (monoVersion.Minor) { - case 3: - return monoVersion.Build >= 2; - case 4: - case 5: - return monoVersion.Build <= 2; - default: - return false; - } - } - private static Version GetNetVersion() { uint release; using (RegistryKey registryKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey("SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\\")) {