diff --git a/ArchiSteamFarm/CardsFarmer.cs b/ArchiSteamFarm/CardsFarmer.cs index c10af0281..63a955c24 100755 --- a/ArchiSteamFarm/CardsFarmer.cs +++ b/ArchiSteamFarm/CardsFarmer.cs @@ -24,6 +24,7 @@ using HtmlAgilityPack; using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Globalization; using System.Text.RegularExpressions; @@ -41,7 +42,7 @@ namespace ArchiSteamFarm { private readonly Bot Bot; private readonly Timer Timer; - internal readonly Dictionary GamesToFarm = new Dictionary(); + internal readonly ConcurrentDictionary GamesToFarm = new ConcurrentDictionary(); internal readonly List CurrentGamesFarming = new List(); private bool NowFarming = false; @@ -57,7 +58,7 @@ namespace ArchiSteamFarm { ); } - internal static List GetGamesToFarmSolo(Dictionary gamesToFarm) { + internal static List GetGamesToFarmSolo(ConcurrentDictionary gamesToFarm) { if (gamesToFarm == null) { return null; } @@ -72,7 +73,7 @@ namespace ArchiSteamFarm { return result; } - internal static uint GetAnyGameToFarm(Dictionary gamesToFarm) { + internal static uint GetAnyGameToFarm(ConcurrentDictionary gamesToFarm) { if (gamesToFarm == null) { return 0; } @@ -84,7 +85,7 @@ namespace ArchiSteamFarm { return 0; } - internal bool FarmMultiple(Dictionary appIDs) { + internal bool FarmMultiple(ConcurrentDictionary appIDs) { if (appIDs.Count == 0) { return true; } @@ -122,7 +123,8 @@ namespace ArchiSteamFarm { Logging.LogGenericInfo(Bot.BotName, "Now farming: " + appID); if (await Farm(appID).ConfigureAwait(false)) { - GamesToFarm.Remove(appID); + double hours; + GamesToFarm.TryRemove(appID, out hours); return true; } else { CurrentGamesFarming.Clear(); diff --git a/ArchiSteamFarm/Properties/AssemblyInfo.cs b/ArchiSteamFarm/Properties/AssemblyInfo.cs index 5493a7e82..f1b137e63 100644 --- a/ArchiSteamFarm/Properties/AssemblyInfo.cs +++ b/ArchiSteamFarm/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.3.0")] -[assembly: AssemblyFileVersion("1.2.3.0")] +[assembly: AssemblyVersion("1.2.4.0")] +[assembly: AssemblyFileVersion("1.2.4.0")] diff --git a/SteamAuth/SteamAuth.csproj b/SteamAuth/SteamAuth.csproj index 9964a0d94..b8b845257 100644 --- a/SteamAuth/SteamAuth.csproj +++ b/SteamAuth/SteamAuth.csproj @@ -22,10 +22,11 @@ 4 - pdbonly + none true bin\Release\ - TRACE + + prompt 4