Refactor EVERYTHING

Directories structure + namespaces relevant to them
This commit is contained in:
JustArchi 2021-05-08 01:37:22 +02:00
parent cbabde1b38
commit e60b54e402
96 changed files with 242 additions and 96 deletions

View file

@ -22,6 +22,7 @@
using System; using System;
using System.Net; using System.Net;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.IPC.Controllers.Api; using ArchiSteamFarm.IPC.Controllers.Api;
using ArchiSteamFarm.IPC.Responses; using ArchiSteamFarm.IPC.Responses;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;

View file

@ -27,8 +27,11 @@ using System.Collections.Generic;
using System.Composition; using System.Composition;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Json; using ArchiSteamFarm.Core;
using ArchiSteamFarm.Plugins; using ArchiSteamFarm.Plugins.Interfaces;
using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Steam.Data;
using ArchiSteamFarm.Steam.Storage;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using SteamKit2; using SteamKit2;

View file

@ -24,7 +24,8 @@ using System.Composition;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Runtime; using System.Runtime;
using System.Threading; using System.Threading;
using ArchiSteamFarm.Plugins; using ArchiSteamFarm.Core;
using ArchiSteamFarm.Plugins.Interfaces;
namespace ArchiSteamFarm.CustomPlugins.PeriodicGC { namespace ArchiSteamFarm.CustomPlugins.PeriodicGC {
[Export(typeof(IPlugin))] [Export(typeof(IPlugin))]

View file

@ -32,6 +32,7 @@ using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Helpers; using ArchiSteamFarm.Helpers;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using Newtonsoft.Json; using Newtonsoft.Json;

View file

@ -23,6 +23,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Immutable; using System.Collections.Immutable;
using System.Globalization; using System.Globalization;
using ArchiSteamFarm.Core;
using Newtonsoft.Json; using Newtonsoft.Json;
using SteamKit2; using SteamKit2;

View file

@ -32,8 +32,11 @@ using System.Linq;
using System.Net; using System.Net;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.OfficialPlugins.SteamTokenDumper.Localization; using ArchiSteamFarm.OfficialPlugins.SteamTokenDumper.Localization;
using ArchiSteamFarm.Plugins; using ArchiSteamFarm.Plugins;
using ArchiSteamFarm.Plugins.Interfaces;
using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Web; using ArchiSteamFarm.Web;
using ArchiSteamFarm.Web.Responses; using ArchiSteamFarm.Web.Responses;
using Newtonsoft.Json; using Newtonsoft.Json;

View file

@ -25,7 +25,7 @@ using ArchiSteamFarm.RuntimeCompatibility;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using ArchiSteamFarm.Json; using ArchiSteamFarm.Steam.Data;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace ArchiSteamFarm.Tests { namespace ArchiSteamFarm.Tests {
@ -36,8 +36,8 @@ namespace ArchiSteamFarm.Tests {
const uint relevantAppID = 42; const uint relevantAppID = 42;
Dictionary<uint, byte> itemsPerSet = new() { Dictionary<uint, byte> itemsPerSet = new() {
{ relevantAppID, ArchiSteamFarm.Bot.MinCardsPerBadge }, { relevantAppID, Steam.Bot.MinCardsPerBadge },
{ 43, ArchiSteamFarm.Bot.MinCardsPerBadge + 1 } { 43, Steam.Bot.MinCardsPerBadge + 1 }
}; };
HashSet<Asset> items = new(); HashSet<Asset> items = new();
@ -48,7 +48,7 @@ namespace ArchiSteamFarm.Tests {
} }
} }
HashSet<Asset> itemsToSend = GetItemsForFullBadge(items, itemsPerSet, ArchiSteamFarm.Bot.MinCardsPerBadge); HashSet<Asset> itemsToSend = GetItemsForFullBadge(items, itemsPerSet, Steam.Bot.MinCardsPerBadge);
Dictionary<(uint RealAppID, ulong ContextID, ulong ClassID), uint> expectedResult = items.Where(item => item.RealAppID == relevantAppID) Dictionary<(uint RealAppID, ulong ContextID, ulong ClassID), uint> expectedResult = items.Where(item => item.RealAppID == relevantAppID)
.GroupBy(item => (item.RealAppID, item.ContextID, item.ClassID)) .GroupBy(item => (item.RealAppID, item.ContextID, item.ClassID))
@ -67,7 +67,7 @@ namespace ArchiSteamFarm.Tests {
CreateCard(2, appID) CreateCard(2, appID)
}; };
GetItemsForFullBadge(items, 2, appID, ArchiSteamFarm.Bot.MinCardsPerBadge - 1); GetItemsForFullBadge(items, 2, appID, Steam.Bot.MinCardsPerBadge - 1);
Assert.Fail(); Assert.Fail();
} }
@ -428,14 +428,14 @@ namespace ArchiSteamFarm.Tests {
HashSet<Asset> items = new(); HashSet<Asset> items = new();
for (byte i = 0; i < ArchiSteamFarm.Trading.MaxItemsPerTrade; i++) { for (byte i = 0; i < Steam.Exchange.Trading.MaxItemsPerTrade; i++) {
items.Add(CreateCard(1, appID)); items.Add(CreateCard(1, appID));
items.Add(CreateCard(2, appID)); items.Add(CreateCard(2, appID));
} }
HashSet<Asset> itemsToSend = GetItemsForFullBadge(items, 2, appID); HashSet<Asset> itemsToSend = GetItemsForFullBadge(items, 2, appID);
Assert.IsTrue(itemsToSend.Count <= ArchiSteamFarm.Trading.MaxItemsPerTrade); Assert.IsTrue(itemsToSend.Count <= Steam.Exchange.Trading.MaxItemsPerTrade);
} }
[TestMethod] [TestMethod]
@ -459,7 +459,7 @@ namespace ArchiSteamFarm.Tests {
HashSet<Asset> itemsToSend = GetItemsForFullBadge(items, itemsPerSet); HashSet<Asset> itemsToSend = GetItemsForFullBadge(items, itemsPerSet);
Assert.IsTrue(itemsToSend.Count <= ArchiSteamFarm.Trading.MaxItemsPerTrade); Assert.IsTrue(itemsToSend.Count <= Steam.Exchange.Trading.MaxItemsPerTrade);
} }
[TestMethod] [TestMethod]
@ -503,12 +503,12 @@ namespace ArchiSteamFarm.Tests {
private static Asset CreateCard(ulong classID, uint realAppID, uint amount = 1, Asset.EType type = Asset.EType.TradingCard, Asset.ERarity rarity = Asset.ERarity.Common) => new(Asset.SteamAppID, Asset.SteamCommunityContextID, classID, amount, realAppID: realAppID, type: type, rarity: rarity); private static Asset CreateCard(ulong classID, uint realAppID, uint amount = 1, Asset.EType type = Asset.EType.TradingCard, Asset.ERarity rarity = Asset.ERarity.Common) => new(Asset.SteamAppID, Asset.SteamCommunityContextID, classID, amount, realAppID: realAppID, type: type, rarity: rarity);
private static HashSet<Asset> GetItemsForFullBadge(IReadOnlyCollection<Asset> inventory, byte cardsPerSet, uint appID, ushort maxItems = ArchiSteamFarm.Trading.MaxItemsPerTrade) => GetItemsForFullBadge(inventory, new Dictionary<uint, byte> { { appID, cardsPerSet } }, maxItems); private static HashSet<Asset> GetItemsForFullBadge(IReadOnlyCollection<Asset> inventory, byte cardsPerSet, uint appID, ushort maxItems = Steam.Exchange.Trading.MaxItemsPerTrade) => GetItemsForFullBadge(inventory, new Dictionary<uint, byte> { { appID, cardsPerSet } }, maxItems);
private static HashSet<Asset> GetItemsForFullBadge(IReadOnlyCollection<Asset> inventory, IDictionary<uint, byte> cardsPerSet, ushort maxItems = ArchiSteamFarm.Trading.MaxItemsPerTrade) { private static HashSet<Asset> GetItemsForFullBadge(IReadOnlyCollection<Asset> inventory, IDictionary<uint, byte> cardsPerSet, ushort maxItems = Steam.Exchange.Trading.MaxItemsPerTrade) {
Dictionary<(uint RealAppID, Asset.EType Type, Asset.ERarity Rarity), List<uint>> inventorySets = ArchiSteamFarm.Trading.GetInventorySets(inventory); Dictionary<(uint RealAppID, Asset.EType Type, Asset.ERarity Rarity), List<uint>> inventorySets = Steam.Exchange.Trading.GetInventorySets(inventory);
return ArchiSteamFarm.Bot.GetItemsForFullSets(inventory, inventorySets.ToDictionary(kv => kv.Key, kv => (SetsToExtract: inventorySets[kv.Key][0], cardsPerSet[kv.Key.RealAppID])), maxItems).ToHashSet(); return Steam.Bot.GetItemsForFullSets(inventory, inventorySets.ToDictionary(kv => kv.Key, kv => (SetsToExtract: inventorySets[kv.Key][0], cardsPerSet[kv.Key.RealAppID])), maxItems).ToHashSet();
} }
} }
} }

View file

@ -20,9 +20,9 @@
// limitations under the License. // limitations under the License.
using System.Collections.Generic; using System.Collections.Generic;
using ArchiSteamFarm.Json; using ArchiSteamFarm.Steam.Data;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using static ArchiSteamFarm.Trading; using static ArchiSteamFarm.Steam.Exchange.Trading;
namespace ArchiSteamFarm.Tests { namespace ArchiSteamFarm.Tests {
[TestClass] [TestClass]

View file

@ -23,6 +23,7 @@ using System;
using System.Collections; using System.Collections;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using ArchiSteamFarm.Core;
namespace ArchiSteamFarm.Collections { namespace ArchiSteamFarm.Collections {
internal sealed class FixedSizeConcurrentQueue<T> : IEnumerable<T> { internal sealed class FixedSizeConcurrentQueue<T> : IEnumerable<T> {

View file

@ -44,13 +44,16 @@ using ArchiSteamFarm.IPC;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.NLog; using ArchiSteamFarm.NLog;
using ArchiSteamFarm.Plugins; using ArchiSteamFarm.Plugins;
using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Steam.Integration;
using ArchiSteamFarm.Storage;
using ArchiSteamFarm.Web; using ArchiSteamFarm.Web;
using ArchiSteamFarm.Web.Responses; using ArchiSteamFarm.Web.Responses;
using JetBrains.Annotations; using JetBrains.Annotations;
using SteamKit2; using SteamKit2;
using SteamKit2.Discovery; using SteamKit2.Discovery;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Core {
public static class ASF { public static class ASF {
// This is based on internal Valve guidelines, we're not using it as a hard limit // This is based on internal Valve guidelines, we're not using it as a hard limit
private const byte MaximumRecommendedBotsCount = 10; private const byte MaximumRecommendedBotsCount = 10;

View file

@ -22,7 +22,7 @@
using System; using System;
using SteamKit2; using SteamKit2;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Core {
internal static class Debugging { internal static class Debugging {
#if DEBUG #if DEBUG
internal static bool IsDebugBuild => true; internal static bool IsDebugBuild => true;

View file

@ -22,8 +22,9 @@
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Steam;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Core {
internal static class Events { internal static class Events {
internal static async Task OnBotShutdown() { internal static async Task OnBotShutdown() {
if (Program.ProcessRequired || ((Bot.Bots != null) && Bot.Bots.Values.Any(bot => bot.KeepRunning))) { if (Program.ProcessRequired || ((Bot.Bots != null) && Bot.Bots.Values.Any(bot => bot.KeepRunning))) {

View file

@ -34,9 +34,10 @@ using System.Text.RegularExpressions;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Storage;
using ArchiSteamFarm.Web; using ArchiSteamFarm.Web;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Core {
internal static class OS { internal static class OS {
// We need to keep this one assigned and not calculated on-demand // We need to keep this one assigned and not calculated on-demand
internal static readonly string ProcessFileName = Process.GetCurrentProcess().MainModule?.FileName ?? throw new InvalidOperationException(nameof(ProcessFileName)); internal static readonly string ProcessFileName = Process.GetCurrentProcess().MainModule?.FileName ?? throw new InvalidOperationException(nameof(ProcessFileName));

View file

@ -31,13 +31,20 @@ using System.Linq;
using System.Net.Http; using System.Net.Http;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Json;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Steam.Data;
using ArchiSteamFarm.Steam.Exchange;
using ArchiSteamFarm.Steam.Idling;
using ArchiSteamFarm.Steam.Integration;
using ArchiSteamFarm.Steam.Security;
using ArchiSteamFarm.Steam.Storage;
using ArchiSteamFarm.Storage;
using ArchiSteamFarm.Web; using ArchiSteamFarm.Web;
using ArchiSteamFarm.Web.Responses; using ArchiSteamFarm.Web.Responses;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Core {
internal sealed class Statistics : IAsyncDisposable { internal sealed class Statistics : IAsyncDisposable {
private const ushort MaxItemsForFairBots = ArchiWebHandler.MaxItemsInSingleInventoryRequest * WebBrowser.MaxTries; // Determines which fair bots we'll deprioritize when matching due to excessive number of inventory requests they need to make, which are likely to fail in the process or cause excessive delays private const ushort MaxItemsForFairBots = ArchiWebHandler.MaxItemsInSingleInventoryRequest * WebBrowser.MaxTries; // Determines which fair bots we'll deprioritize when matching due to excessive number of inventory requests they need to make, which are likely to fail in the process or cause excessive delays
private const byte MaxMatchedBotsHard = 40; // Determines how many bots we can attempt to match in total, where match attempt is equal to analyzing bot's inventory private const byte MaxMatchedBotsHard = 40; // Determines how many bots we can attempt to match in total, where match attempt is equal to analyzing bot's inventory

View file

@ -29,12 +29,13 @@ using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using AngleSharp.Dom; using AngleSharp.Dom;
using AngleSharp.XPath; using AngleSharp.XPath;
using ArchiSteamFarm.Storage;
using Humanizer; using Humanizer;
using Humanizer.Localisation; using Humanizer.Localisation;
using JetBrains.Annotations; using JetBrains.Annotations;
using SteamKit2; using SteamKit2;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Core {
public static class Utilities { public static class Utilities {
private const byte TimeoutForLongRunningTasksInSeconds = 60; private const byte TimeoutForLongRunningTasksInSeconds = 60;

View file

@ -26,10 +26,11 @@ using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
using ArchiSteamFarm.Core;
using CryptSharp.Utility; using CryptSharp.Utility;
using SteamKit2; using SteamKit2;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Helpers {
public static class ArchiCryptoHelper { public static class ArchiCryptoHelper {
private const byte DefaultHashLength = 32; private const byte DefaultHashLength = 32;
private const ushort SteamParentalPbkdf2Iterations = 10000; private const ushort SteamParentalPbkdf2Iterations = 10000;

View file

@ -26,6 +26,7 @@ using System.Runtime.InteropServices;
using System.Security.AccessControl; using System.Security.AccessControl;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Core;
namespace ArchiSteamFarm.Helpers { namespace ArchiSteamFarm.Helpers {
internal sealed class CrossProcessFileBasedSemaphore : ICrossProcessSemaphore, IDisposable { internal sealed class CrossProcessFileBasedSemaphore : ICrossProcessSemaphore, IDisposable {

View file

@ -22,6 +22,7 @@
using System; using System;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.RuntimeCompatibility; using ArchiSteamFarm.RuntimeCompatibility;
using Newtonsoft.Json; using Newtonsoft.Json;

View file

@ -29,9 +29,11 @@ using Microsoft.Extensions.Hosting;
using System; using System;
using System.IO; using System.IO;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.IPC.Controllers.Api; using ArchiSteamFarm.IPC.Controllers.Api;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.NLog; using ArchiSteamFarm.NLog;
using ArchiSteamFarm.NLog.Targets;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;

View file

@ -25,10 +25,13 @@ using System.Globalization;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.IPC.Requests; using ArchiSteamFarm.IPC.Requests;
using ArchiSteamFarm.IPC.Responses; using ArchiSteamFarm.IPC.Responses;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.RuntimeCompatibility; using ArchiSteamFarm.RuntimeCompatibility;
using ArchiSteamFarm.Steam.Interaction;
using ArchiSteamFarm.Storage;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;

View file

@ -21,6 +21,7 @@
using System.Net; using System.Net;
using ArchiSteamFarm.IPC.Responses; using ArchiSteamFarm.IPC.Responses;
using ArchiSteamFarm.Storage;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations; using Swashbuckle.AspNetCore.Annotations;

View file

@ -29,10 +29,14 @@ using System.Globalization;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Callbacks; using ArchiSteamFarm.Core;
using ArchiSteamFarm.IPC.Requests; using ArchiSteamFarm.IPC.Requests;
using ArchiSteamFarm.IPC.Responses; using ArchiSteamFarm.IPC.Responses;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Steam.Integration.Callbacks;
using ArchiSteamFarm.Steam.Security;
using ArchiSteamFarm.Steam.Storage;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;

View file

@ -24,9 +24,12 @@ using System.Globalization;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.IPC.Requests; using ArchiSteamFarm.IPC.Requests;
using ArchiSteamFarm.IPC.Responses; using ArchiSteamFarm.IPC.Responses;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Storage;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
namespace ArchiSteamFarm.IPC.Controllers.Api { namespace ArchiSteamFarm.IPC.Controllers.Api {

View file

@ -32,9 +32,10 @@ using System.Net.WebSockets;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.IPC.Responses; using ArchiSteamFarm.IPC.Responses;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.NLog; using ArchiSteamFarm.NLog.Targets;
using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Connections;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json; using Newtonsoft.Json;

View file

@ -24,6 +24,7 @@ using System.Collections.Generic;
using System.Net; using System.Net;
using ArchiSteamFarm.IPC.Responses; using ArchiSteamFarm.IPC.Responses;
using ArchiSteamFarm.Plugins; using ArchiSteamFarm.Plugins;
using ArchiSteamFarm.Plugins.Interfaces;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
namespace ArchiSteamFarm.IPC.Controllers.Api { namespace ArchiSteamFarm.IPC.Controllers.Api {

View file

@ -25,6 +25,7 @@ using System.Globalization;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Reflection; using System.Reflection;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.IPC.Responses; using ArchiSteamFarm.IPC.Responses;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;

View file

@ -26,6 +26,9 @@ using System.Linq;
using System.Net; using System.Net;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Helpers;
using ArchiSteamFarm.Storage;
using JetBrains.Annotations; using JetBrains.Annotations;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Primitives; using Microsoft.Extensions.Primitives;

View file

@ -21,6 +21,7 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using ArchiSteamFarm.Helpers;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm.IPC.Requests { namespace ArchiSteamFarm.IPC.Requests {

View file

@ -21,6 +21,7 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using ArchiSteamFarm.Helpers;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm.IPC.Requests { namespace ArchiSteamFarm.IPC.Requests {

View file

@ -21,6 +21,7 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using ArchiSteamFarm.Storage;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm.IPC.Requests { namespace ArchiSteamFarm.IPC.Requests {

View file

@ -20,6 +20,7 @@
// limitations under the License. // limitations under the License.
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using ArchiSteamFarm.Core;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm.IPC.Requests { namespace ArchiSteamFarm.IPC.Requests {

View file

@ -21,6 +21,7 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using ArchiSteamFarm.Steam.Storage;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm.IPC.Requests { namespace ArchiSteamFarm.IPC.Requests {

View file

@ -25,7 +25,9 @@ using System.Collections.Immutable;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Steam.Security;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm.IPC.Requests { namespace ArchiSteamFarm.IPC.Requests {

View file

@ -21,6 +21,7 @@
using System; using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using ArchiSteamFarm.Storage;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm.IPC.Responses { namespace ArchiSteamFarm.IPC.Responses {

View file

@ -32,9 +32,11 @@ using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.Net; using System.Net;
using System.Reflection; using System.Reflection;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.IPC.Integration; using ArchiSteamFarm.IPC.Integration;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Plugins; using ArchiSteamFarm.Plugins;
using ArchiSteamFarm.Storage;
using JetBrains.Annotations; using JetBrains.Annotations;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;

View file

@ -24,6 +24,7 @@ using System.Globalization;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.RuntimeCompatibility; using ArchiSteamFarm.RuntimeCompatibility;
using JetBrains.Annotations; using JetBrains.Annotations;

View file

@ -28,8 +28,12 @@ using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Collections; using ArchiSteamFarm.Collections;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.IPC; using ArchiSteamFarm.IPC;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.NLog.Targets;
using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Storage;
using NLog; using NLog;
using NLog.Config; using NLog.Config;
using NLog.Targets; using NLog.Targets;

View file

@ -22,11 +22,12 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using ArchiSteamFarm.Collections; using ArchiSteamFarm.Collections;
using ArchiSteamFarm.Core;
using JetBrains.Annotations; using JetBrains.Annotations;
using NLog; using NLog;
using NLog.Targets; using NLog.Targets;
namespace ArchiSteamFarm.NLog { namespace ArchiSteamFarm.NLog.Targets {
[Target(TargetName)] [Target(TargetName)]
internal sealed class HistoryTarget : TargetWithLayout { internal sealed class HistoryTarget : TargetWithLayout {
internal const string TargetName = "History"; internal const string TargetName = "History";

View file

@ -26,13 +26,14 @@ using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Steam;
using JetBrains.Annotations; using JetBrains.Annotations;
using NLog; using NLog;
using NLog.Config; using NLog.Config;
using NLog.Layouts; using NLog.Layouts;
using NLog.Targets; using NLog.Targets;
namespace ArchiSteamFarm.NLog { namespace ArchiSteamFarm.NLog.Targets {
[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")]
[Target(TargetName)] [Target(TargetName)]
internal sealed class SteamTarget : AsyncTaskTarget { internal sealed class SteamTarget : AsyncTaskTarget {

View file

@ -24,7 +24,7 @@ using JetBrains.Annotations;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
namespace ArchiSteamFarm.Plugins { namespace ArchiSteamFarm.Plugins.Interfaces {
[PublicAPI] [PublicAPI]
public interface IASF : IPlugin { public interface IASF : IPlugin {
/// <summary> /// <summary>

View file

@ -19,9 +19,10 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
using ArchiSteamFarm.Steam;
using JetBrains.Annotations; using JetBrains.Annotations;
namespace ArchiSteamFarm.Plugins { namespace ArchiSteamFarm.Plugins.Interfaces {
[PublicAPI] [PublicAPI]
public interface IBot : IPlugin { public interface IBot : IPlugin {
/// <summary> /// <summary>

View file

@ -19,9 +19,10 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
using ArchiSteamFarm.Steam;
using JetBrains.Annotations; using JetBrains.Annotations;
namespace ArchiSteamFarm.Plugins { namespace ArchiSteamFarm.Plugins.Interfaces {
[PublicAPI] [PublicAPI]
public interface IBotCardsFarmerInfo : IPlugin { public interface IBotCardsFarmerInfo : IPlugin {
/// <summary> /// <summary>

View file

@ -20,9 +20,11 @@
// limitations under the License. // limitations under the License.
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Storage;
using JetBrains.Annotations; using JetBrains.Annotations;
namespace ArchiSteamFarm.Plugins { namespace ArchiSteamFarm.Plugins.Interfaces {
[PublicAPI] [PublicAPI]
public interface IBotCommand : IPlugin { public interface IBotCommand : IPlugin {
/// <summary> /// <summary>

View file

@ -19,10 +19,11 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
using ArchiSteamFarm.Steam;
using JetBrains.Annotations; using JetBrains.Annotations;
using SteamKit2; using SteamKit2;
namespace ArchiSteamFarm.Plugins { namespace ArchiSteamFarm.Plugins.Interfaces {
[PublicAPI] [PublicAPI]
public interface IBotConnection : IPlugin { public interface IBotConnection : IPlugin {
/// <summary> /// <summary>

View file

@ -20,9 +20,10 @@
// limitations under the License. // limitations under the License.
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Steam;
using JetBrains.Annotations; using JetBrains.Annotations;
namespace ArchiSteamFarm.Plugins { namespace ArchiSteamFarm.Plugins.Interfaces {
[PublicAPI] [PublicAPI]
public interface IBotFriendRequest : IPlugin { public interface IBotFriendRequest : IPlugin {
/// <summary> /// <summary>

View file

@ -20,9 +20,11 @@
// limitations under the License. // limitations under the License.
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Storage;
using JetBrains.Annotations; using JetBrains.Annotations;
namespace ArchiSteamFarm.Plugins { namespace ArchiSteamFarm.Plugins.Interfaces {
[PublicAPI] [PublicAPI]
public interface IBotMessage : IPlugin { public interface IBotMessage : IPlugin {
/// <summary> /// <summary>

View file

@ -20,11 +20,12 @@
// limitations under the License. // limitations under the License.
using System.Collections.Generic; using System.Collections.Generic;
using ArchiSteamFarm.Steam;
using JetBrains.Annotations; using JetBrains.Annotations;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
namespace ArchiSteamFarm.Plugins { namespace ArchiSteamFarm.Plugins.Interfaces {
[PublicAPI] [PublicAPI]
public interface IBotModules : IPlugin { public interface IBotModules : IPlugin {
/// <summary> /// <summary>

View file

@ -20,10 +20,11 @@
// limitations under the License. // limitations under the License.
using System.Collections.Generic; using System.Collections.Generic;
using ArchiSteamFarm.Steam;
using JetBrains.Annotations; using JetBrains.Annotations;
using SteamKit2; using SteamKit2;
namespace ArchiSteamFarm.Plugins { namespace ArchiSteamFarm.Plugins.Interfaces {
[PublicAPI] [PublicAPI]
public interface IBotSteamClient : IPlugin { public interface IBotSteamClient : IPlugin {
/// <summary> /// <summary>

View file

@ -20,10 +20,11 @@
// limitations under the License. // limitations under the License.
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Json; using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Steam.Data;
using JetBrains.Annotations; using JetBrains.Annotations;
namespace ArchiSteamFarm.Plugins { namespace ArchiSteamFarm.Plugins.Interfaces {
[PublicAPI] [PublicAPI]
public interface IBotTradeOffer : IPlugin { public interface IBotTradeOffer : IPlugin {
/// <summary> /// <summary>

View file

@ -20,9 +20,11 @@
// limitations under the License. // limitations under the License.
using System.Collections.Generic; using System.Collections.Generic;
using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Steam.Exchange;
using JetBrains.Annotations; using JetBrains.Annotations;
namespace ArchiSteamFarm.Plugins { namespace ArchiSteamFarm.Plugins.Interfaces {
[PublicAPI] [PublicAPI]
public interface IBotTradeOfferResults : IPlugin { public interface IBotTradeOfferResults : IPlugin {
/// <summary> /// <summary>

View file

@ -20,10 +20,11 @@
// limitations under the License. // limitations under the License.
using System.Collections.Generic; using System.Collections.Generic;
using ArchiSteamFarm.Callbacks; using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Steam.Integration.Callbacks;
using JetBrains.Annotations; using JetBrains.Annotations;
namespace ArchiSteamFarm.Plugins { namespace ArchiSteamFarm.Plugins.Interfaces {
[PublicAPI] [PublicAPI]
public interface IBotUserNotifications : IPlugin { public interface IBotUserNotifications : IPlugin {
/// <summary> /// <summary>

View file

@ -22,7 +22,7 @@
using System; using System;
using JetBrains.Annotations; using JetBrains.Annotations;
namespace ArchiSteamFarm.Plugins { namespace ArchiSteamFarm.Plugins.Interfaces {
[PublicAPI] [PublicAPI]
public interface IBotsComparer : IPlugin { public interface IBotsComparer : IPlugin {
/// <summary> /// <summary>

View file

@ -23,7 +23,7 @@ using System.Threading.Tasks;
using ArchiSteamFarm.Helpers; using ArchiSteamFarm.Helpers;
using JetBrains.Annotations; using JetBrains.Annotations;
namespace ArchiSteamFarm.Plugins { namespace ArchiSteamFarm.Plugins.Interfaces {
[PublicAPI] [PublicAPI]
public interface ICrossProcessSemaphoreProvider : IPlugin { public interface ICrossProcessSemaphoreProvider : IPlugin {
/// <summary> /// <summary>

View file

@ -23,7 +23,7 @@ using System;
using JetBrains.Annotations; using JetBrains.Annotations;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm.Plugins { namespace ArchiSteamFarm.Plugins.Interfaces {
[PublicAPI] [PublicAPI]
public interface IPlugin { public interface IPlugin {
/// <summary> /// <summary>

View file

@ -24,7 +24,7 @@ using System.Threading.Tasks;
using JetBrains.Annotations; using JetBrains.Annotations;
using SteamKit2; using SteamKit2;
namespace ArchiSteamFarm.Plugins { namespace ArchiSteamFarm.Plugins.Interfaces {
[PublicAPI] [PublicAPI]
public interface ISteamPICSChanges : IPlugin { public interface ISteamPICSChanges : IPlugin {
/// <summary> /// <summary>

View file

@ -20,6 +20,7 @@
// limitations under the License. // limitations under the License.
using System; using System;
using ArchiSteamFarm.Plugins.Interfaces;
namespace ArchiSteamFarm.Plugins { namespace ArchiSteamFarm.Plugins {
internal abstract class OfficialPlugin : IPlugin { internal abstract class OfficialPlugin : IPlugin {

View file

@ -30,10 +30,14 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Callbacks; using ArchiSteamFarm.Core;
using ArchiSteamFarm.Helpers; using ArchiSteamFarm.Helpers;
using ArchiSteamFarm.Json;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Plugins.Interfaces;
using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Steam.Data;
using ArchiSteamFarm.Steam.Exchange;
using ArchiSteamFarm.Steam.Integration.Callbacks;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using SteamKit2; using SteamKit2;

View file

@ -28,9 +28,14 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Resources; using System.Resources;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Helpers;
using ArchiSteamFarm.IPC; using ArchiSteamFarm.IPC;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.NLog; using ArchiSteamFarm.NLog;
using ArchiSteamFarm.NLog.Targets;
using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Storage;
using ArchiSteamFarm.Web; using ArchiSteamFarm.Web;
using Newtonsoft.Json; using Newtonsoft.Json;
using NLog; using NLog;

View file

@ -22,6 +22,7 @@
using System; using System;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Plugins; using ArchiSteamFarm.Plugins;
using JetBrains.Annotations; using JetBrains.Annotations;

15
ArchiSteamFarm/Bot.cs → ArchiSteamFarm/Steam/Bot.cs Executable file → Normal file
View file

@ -40,19 +40,28 @@ using System.Text.RegularExpressions;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using AngleSharp.Dom; using AngleSharp.Dom;
using ArchiSteamFarm.Callbacks;
using ArchiSteamFarm.Collections; using ArchiSteamFarm.Collections;
using ArchiSteamFarm.Json; using ArchiSteamFarm.Core;
using ArchiSteamFarm.Helpers;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.NLog; using ArchiSteamFarm.NLog;
using ArchiSteamFarm.Plugins; using ArchiSteamFarm.Plugins;
using ArchiSteamFarm.Steam.Data;
using ArchiSteamFarm.Steam.Exchange;
using ArchiSteamFarm.Steam.Idling;
using ArchiSteamFarm.Steam.Integration;
using ArchiSteamFarm.Steam.Integration.Callbacks;
using ArchiSteamFarm.Steam.Interaction;
using ArchiSteamFarm.Steam.Security;
using ArchiSteamFarm.Steam.Storage;
using ArchiSteamFarm.Storage;
using ArchiSteamFarm.Web; using ArchiSteamFarm.Web;
using JetBrains.Annotations; using JetBrains.Annotations;
using Newtonsoft.Json; using Newtonsoft.Json;
using SteamKit2; using SteamKit2;
using SteamKit2.Internal; using SteamKit2.Internal;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Steam {
public sealed class Bot : IAsyncDisposable { public sealed class Bot : IAsyncDisposable {
internal const ushort CallbackSleep = 500; // In milliseconds internal const ushort CallbackSleep = 500; // In milliseconds
internal const ushort MaxMessagePrefixLength = MaxMessageLength - ReservedMessageLength - 2; // 2 for a minimum of 2 characters (escape one and real one) internal const ushort MaxMessagePrefixLength = MaxMessageLength - ReservedMessageLength - 2; // 2 for a minimum of 2 characters (escape one and real one)

View file

@ -23,11 +23,12 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Immutable; using System.Collections.Immutable;
using System.Globalization; using System.Globalization;
using ArchiSteamFarm.Core;
using JetBrains.Annotations; using JetBrains.Annotations;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
namespace ArchiSteamFarm.Json { namespace ArchiSteamFarm.Steam.Data {
// REF: https://developer.valvesoftware.com/wiki/Steam_Web_API/IEconService#CEcon_Asset // REF: https://developer.valvesoftware.com/wiki/Steam_Web_API/IEconService#CEcon_Asset
public sealed class Asset { public sealed class Asset {
[PublicAPI] [PublicAPI]

View file

@ -23,7 +23,7 @@ using System.Diagnostics.CodeAnalysis;
using JetBrains.Annotations; using JetBrains.Annotations;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm.Json { namespace ArchiSteamFarm.Steam.Data {
[PublicAPI] [PublicAPI]
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
public class BooleanResponse { public class BooleanResponse {

View file

@ -24,7 +24,7 @@ using JetBrains.Annotations;
using Newtonsoft.Json; using Newtonsoft.Json;
using SteamKit2; using SteamKit2;
namespace ArchiSteamFarm.Json { namespace ArchiSteamFarm.Steam.Data {
[PublicAPI] [PublicAPI]
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
public class EResultResponse { public class EResultResponse {

View file

@ -24,12 +24,13 @@ using System.Collections.Generic;
using System.Collections.Immutable; using System.Collections.Immutable;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Globalization; using System.Globalization;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using JetBrains.Annotations; using JetBrains.Annotations;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
namespace ArchiSteamFarm.Json { namespace ArchiSteamFarm.Steam.Data {
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
internal sealed class InventoryResponse : EResultResponse { internal sealed class InventoryResponse : EResultResponse {
[JsonProperty(PropertyName = "assets", Required = Required.DisallowNull)] [JsonProperty(PropertyName = "assets", Required = Required.DisallowNull)]

View file

@ -23,7 +23,7 @@ using System.Collections.Immutable;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm.Json { namespace ArchiSteamFarm.Steam.Data {
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
internal sealed class NewDiscoveryQueueResponse { internal sealed class NewDiscoveryQueueResponse {
[JsonProperty(PropertyName = "queue", Required = Required.Always)] [JsonProperty(PropertyName = "queue", Required = Required.Always)]

View file

@ -23,7 +23,7 @@ using System.Diagnostics.CodeAnalysis;
using Newtonsoft.Json; using Newtonsoft.Json;
using SteamKit2; using SteamKit2;
namespace ArchiSteamFarm.Json { namespace ArchiSteamFarm.Steam.Data {
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
internal sealed class RedeemWalletResponse : EResultResponse { internal sealed class RedeemWalletResponse : EResultResponse {
[JsonProperty(PropertyName = "detail", Required = Required.DisallowNull)] [JsonProperty(PropertyName = "detail", Required = Required.DisallowNull)]

View file

@ -23,7 +23,7 @@ using System;
using JetBrains.Annotations; using JetBrains.Annotations;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm.Json { namespace ArchiSteamFarm.Steam.Data {
public sealed class Tag { public sealed class Tag {
[JsonProperty(PropertyName = "category", Required = Required.Always)] [JsonProperty(PropertyName = "category", Required = Required.Always)]
[PublicAPI] [PublicAPI]

View file

@ -26,7 +26,7 @@ using System.Linq;
using JetBrains.Annotations; using JetBrains.Annotations;
using SteamKit2; using SteamKit2;
namespace ArchiSteamFarm.Json { namespace ArchiSteamFarm.Steam.Data {
// REF: https://developer.valvesoftware.com/wiki/Steam_Web_API/IEconService#CEcon_TradeOffer // REF: https://developer.valvesoftware.com/wiki/Steam_Web_API/IEconService#CEcon_TradeOffer
public sealed class TradeOffer { public sealed class TradeOffer {
[PublicAPI] [PublicAPI]

View file

@ -22,7 +22,7 @@
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm.Json { namespace ArchiSteamFarm.Steam.Data {
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
internal sealed class TradeOfferAcceptResponse { internal sealed class TradeOfferAcceptResponse {
[JsonProperty(PropertyName = "strError", Required = Required.DisallowNull)] [JsonProperty(PropertyName = "strError", Required = Required.DisallowNull)]

View file

@ -22,7 +22,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm.Json { namespace ArchiSteamFarm.Steam.Data {
internal sealed class TradeOfferSendRequest { internal sealed class TradeOfferSendRequest {
[JsonProperty(PropertyName = "me", Required = Required.Always)] [JsonProperty(PropertyName = "me", Required = Required.Always)]
internal readonly ItemList ItemsToGive = new(); internal readonly ItemList ItemsToGive = new();

View file

@ -20,9 +20,10 @@
// limitations under the License. // limitations under the License.
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using ArchiSteamFarm.Core;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm.Json { namespace ArchiSteamFarm.Steam.Data {
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
internal sealed class TradeOfferSendResponse { internal sealed class TradeOfferSendResponse {
[JsonProperty(PropertyName = "strError", Required = Required.DisallowNull)] [JsonProperty(PropertyName = "strError", Required = Required.DisallowNull)]

View file

@ -22,9 +22,10 @@
using System; using System;
using System.ComponentModel; using System.ComponentModel;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using ArchiSteamFarm.Steam.Integration;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm.Json { namespace ArchiSteamFarm.Steam.Data {
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
internal sealed class UserPrivacy { internal sealed class UserPrivacy {
[JsonProperty(PropertyName = "eCommentPermission", Required = Required.Always)] [JsonProperty(PropertyName = "eCommentPermission", Required = Required.Always)]

View file

@ -24,10 +24,10 @@ using System.Collections.Generic;
using System.Collections.Immutable; using System.Collections.Immutable;
using System.ComponentModel; using System.ComponentModel;
using System.Linq; using System.Linq;
using ArchiSteamFarm.Json; using ArchiSteamFarm.Steam.Data;
using JetBrains.Annotations; using JetBrains.Annotations;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Steam.Exchange {
public sealed class ParseTradeResult { public sealed class ParseTradeResult {
[PublicAPI] [PublicAPI]
public EResult Result { get; } public EResult Result { get; }

View file

@ -30,13 +30,17 @@ using System.Net.Http;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Collections; using ArchiSteamFarm.Collections;
using ArchiSteamFarm.Json; using ArchiSteamFarm.Core;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Plugins; using ArchiSteamFarm.Plugins;
using ArchiSteamFarm.Steam.Data;
using ArchiSteamFarm.Steam.Idling;
using ArchiSteamFarm.Steam.Security;
using ArchiSteamFarm.Steam.Storage;
using JetBrains.Annotations; using JetBrains.Annotations;
using SteamKit2; using SteamKit2;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Steam.Exchange {
public sealed class Trading : IDisposable { public sealed class Trading : IDisposable {
internal const byte MaxItemsPerTrade = byte.MaxValue; // This is decided upon various factors, mainly stability of Steam servers when dealing with huge trade offers internal const byte MaxItemsPerTrade = byte.MaxValue; // This is decided upon various factors, mainly stability of Steam servers when dealing with huge trade offers
internal const byte MaxTradesPerAccount = 5; // This is limit introduced by Valve internal const byte MaxTradesPerAccount = 5; // This is limit introduced by Valve

View file

@ -34,13 +34,17 @@ using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using AngleSharp.Dom; using AngleSharp.Dom;
using ArchiSteamFarm.Collections; using ArchiSteamFarm.Collections;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Plugins; using ArchiSteamFarm.Plugins;
using ArchiSteamFarm.Steam.Integration;
using ArchiSteamFarm.Steam.Storage;
using ArchiSteamFarm.Storage;
using JetBrains.Annotations; using JetBrains.Annotations;
using Newtonsoft.Json; using Newtonsoft.Json;
using SteamKit2; using SteamKit2;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Steam.Idling {
public sealed class CardsFarmer : IAsyncDisposable { public sealed class CardsFarmer : IAsyncDisposable {
internal const byte DaysForRefund = 14; // In how many days since payment we're allowed to refund internal const byte DaysForRefund = 14; // In how many days since payment we're allowed to refund
internal const byte HoursForRefund = 2; // Up to how many hours we're allowed to play for refund internal const byte HoursForRefund = 2; // Up to how many hours we're allowed to play for refund

View file

@ -25,7 +25,7 @@ using HashCode = ArchiSteamFarm.RuntimeCompatibility.HashCode;
using System; using System;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Steam.Idling {
public sealed class Game : IEquatable<Game> { public sealed class Game : IEquatable<Game> {
[JsonProperty] [JsonProperty]
public uint AppID { get; } public uint AppID { get; }

View file

@ -24,14 +24,15 @@ using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Callbacks; using ArchiSteamFarm.Core;
using ArchiSteamFarm.CMsgs;
using ArchiSteamFarm.NLog; using ArchiSteamFarm.NLog;
using ArchiSteamFarm.Steam.Integration.Callbacks;
using ArchiSteamFarm.Steam.Integration.CMsgs;
using JetBrains.Annotations; using JetBrains.Annotations;
using SteamKit2; using SteamKit2;
using SteamKit2.Internal; using SteamKit2.Internal;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Steam.Integration {
public sealed class ArchiHandler : ClientMsgHandler { public sealed class ArchiHandler : ClientMsgHandler {
internal const byte MaxGamesPlayedConcurrently = 32; // This is limit introduced by Steam Network internal const byte MaxGamesPlayedConcurrently = 32; // This is limit introduced by Steam Network

View file

@ -36,9 +36,14 @@ using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Xml; using System.Xml;
using AngleSharp.Dom; using AngleSharp.Dom;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Helpers; using ArchiSteamFarm.Helpers;
using ArchiSteamFarm.Json;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Steam.Data;
using ArchiSteamFarm.Steam.Exchange;
using ArchiSteamFarm.Steam.Security;
using ArchiSteamFarm.Steam.Storage;
using ArchiSteamFarm.Storage;
using ArchiSteamFarm.Web; using ArchiSteamFarm.Web;
using ArchiSteamFarm.Web.Responses; using ArchiSteamFarm.Web.Responses;
using JetBrains.Annotations; using JetBrains.Annotations;
@ -47,7 +52,7 @@ using Newtonsoft.Json.Linq;
using SteamKit2; using SteamKit2;
using Formatting = Newtonsoft.Json.Formatting; using Formatting = Newtonsoft.Json.Formatting;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Steam.Integration {
public sealed class ArchiWebHandler : IDisposable { public sealed class ArchiWebHandler : IDisposable {
internal const ushort MaxItemsInSingleInventoryRequest = 5000; internal const ushort MaxItemsInSingleInventoryRequest = 5000;

View file

@ -25,7 +25,7 @@ using System.Text;
using SteamKit2; using SteamKit2;
using SteamKit2.Internal; using SteamKit2.Internal;
namespace ArchiSteamFarm.CMsgs { namespace ArchiSteamFarm.Steam.Integration.CMsgs {
internal sealed class CMsgClientAcknowledgeClanInvite : ISteamSerializableMessage { internal sealed class CMsgClientAcknowledgeClanInvite : ISteamSerializableMessage {
internal bool AcceptInvite { private get; set; } internal bool AcceptInvite { private get; set; }
internal ulong ClanID { private get; set; } internal ulong ClanID { private get; set; }

View file

@ -24,11 +24,12 @@ using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.IO; using System.IO;
using System.Net; using System.Net;
using ArchiSteamFarm.Core;
using JetBrains.Annotations; using JetBrains.Annotations;
using SteamKit2; using SteamKit2;
using SteamKit2.Internal; using SteamKit2.Internal;
namespace ArchiSteamFarm.Callbacks { namespace ArchiSteamFarm.Steam.Integration.Callbacks {
public sealed class PurchaseResponseCallback : CallbackMsg { public sealed class PurchaseResponseCallback : CallbackMsg {
[PublicAPI] [PublicAPI]
public Dictionary<uint, string>? Items { get; } public Dictionary<uint, string>? Items { get; }

View file

@ -22,12 +22,13 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using JetBrains.Annotations; using JetBrains.Annotations;
using SteamKit2; using SteamKit2;
using SteamKit2.Internal; using SteamKit2.Internal;
namespace ArchiSteamFarm.Callbacks { namespace ArchiSteamFarm.Steam.Integration.Callbacks {
public sealed class UserNotificationsCallback : CallbackMsg { public sealed class UserNotificationsCallback : CallbackMsg {
internal readonly Dictionary<EUserNotification, uint> Notifications; internal readonly Dictionary<EUserNotification, uint> Notifications;

View file

@ -22,12 +22,13 @@
using System; using System;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Plugins; using ArchiSteamFarm.Plugins;
using ArchiSteamFarm.Web; using ArchiSteamFarm.Web;
using SteamKit2; using SteamKit2;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Steam.Integration {
internal static class SteamPICSChanges { internal static class SteamPICSChanges {
private const byte RefreshTimerInMinutes = 5; private const byte RefreshTimerInMinutes = 5;

View file

@ -28,9 +28,10 @@ using System.Globalization;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using AngleSharp.Dom; using AngleSharp.Dom;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Steam.Integration {
internal sealed class SteamSaleEvent : IAsyncDisposable { internal sealed class SteamSaleEvent : IAsyncDisposable {
private const byte MaxSingleQueuesDaily = 3; // This is only a failsafe for infinite queue clearing (in case IsDiscoveryQueueAvailable() would fail us) private const byte MaxSingleQueuesDaily = 3; // This is only a failsafe for infinite queue clearing (in case IsDiscoveryQueueAvailable() would fail us)

View file

@ -30,16 +30,22 @@ using System.Linq;
using System.Net.Http; using System.Net.Http;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Callbacks;
using ArchiSteamFarm.Collections; using ArchiSteamFarm.Collections;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Helpers; using ArchiSteamFarm.Helpers;
using ArchiSteamFarm.Json;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Steam.Data;
using ArchiSteamFarm.Steam.Exchange;
using ArchiSteamFarm.Steam.Integration;
using ArchiSteamFarm.Steam.Integration.Callbacks;
using ArchiSteamFarm.Steam.Security;
using ArchiSteamFarm.Steam.Storage;
using ArchiSteamFarm.Storage;
using ArchiSteamFarm.Web; using ArchiSteamFarm.Web;
using JetBrains.Annotations; using JetBrains.Annotations;
using SteamKit2; using SteamKit2;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Steam.Interaction {
public sealed class Actions : IAsyncDisposable { public sealed class Actions : IAsyncDisposable {
private static readonly SemaphoreSlim GiftCardsSemaphore = new(1, 1); private static readonly SemaphoreSlim GiftCardsSemaphore = new(1, 1);

View file

@ -27,15 +27,21 @@ using System.Net.Http;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Callbacks; using ArchiSteamFarm.Core;
using ArchiSteamFarm.Json; using ArchiSteamFarm.Helpers;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Plugins; using ArchiSteamFarm.Plugins;
using ArchiSteamFarm.RuntimeCompatibility; using ArchiSteamFarm.RuntimeCompatibility;
using ArchiSteamFarm.Steam.Data;
using ArchiSteamFarm.Steam.Idling;
using ArchiSteamFarm.Steam.Integration;
using ArchiSteamFarm.Steam.Integration.Callbacks;
using ArchiSteamFarm.Steam.Storage;
using ArchiSteamFarm.Storage;
using JetBrains.Annotations; using JetBrains.Annotations;
using SteamKit2; using SteamKit2;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Steam.Interaction {
public sealed class Commands { public sealed class Commands {
private const ushort SteamTypingStatusDelay = 10 * 1000; // Steam client broadcasts typing status each 10 seconds private const ushort SteamTypingStatusDelay = 10 * 1000; // Steam client broadcasts typing status each 10 seconds

View file

@ -24,7 +24,7 @@ using System.ComponentModel;
using JetBrains.Annotations; using JetBrains.Annotations;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Steam.Security {
public sealed class Confirmation { public sealed class Confirmation {
[JsonProperty(Required = Required.Always)] [JsonProperty(Required = Required.Always)]
public ulong Creator { get; } public ulong Creator { get; }

View file

@ -29,11 +29,13 @@ using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using AngleSharp.Dom; using AngleSharp.Dom;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Helpers; using ArchiSteamFarm.Helpers;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Storage;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Steam.Security {
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
public sealed class MobileAuthenticator : IDisposable { public sealed class MobileAuthenticator : IDisposable {
internal const byte BackupCodeDigits = 7; internal const byte BackupCodeDigits = 7;

View file

@ -27,7 +27,7 @@ using ArchiSteamFarm.Collections;
using Newtonsoft.Json; using Newtonsoft.Json;
using SteamKit2.Discovery; using SteamKit2.Discovery;
namespace ArchiSteamFarm.SteamKit2 { namespace ArchiSteamFarm.Steam.SteamKit2 {
internal sealed class InMemoryServerListProvider : IServerListProvider { internal sealed class InMemoryServerListProvider : IServerListProvider {
[JsonProperty(Required = Required.DisallowNull)] [JsonProperty(Required = Required.DisallowNull)]
private readonly ConcurrentHashSet<ServerRecordEndPoint> ServerRecords = new(); private readonly ConcurrentHashSet<ServerRecordEndPoint> ServerRecords = new();

View file

@ -27,7 +27,7 @@ using System.ComponentModel;
using Newtonsoft.Json; using Newtonsoft.Json;
using SteamKit2; using SteamKit2;
namespace ArchiSteamFarm.SteamKit2 { namespace ArchiSteamFarm.Steam.SteamKit2 {
internal sealed class ServerRecordEndPoint : IEquatable<ServerRecordEndPoint> { internal sealed class ServerRecordEndPoint : IEquatable<ServerRecordEndPoint> {
[JsonProperty(Required = Required.Always)] [JsonProperty(Required = Required.Always)]
internal readonly string Host = ""; internal readonly string Host = "";

View file

@ -27,15 +27,18 @@ using System.Globalization;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Json; using ArchiSteamFarm.Core;
using ArchiSteamFarm.Helpers;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.RuntimeCompatibility; using ArchiSteamFarm.RuntimeCompatibility;
using ArchiSteamFarm.Steam.Data;
using ArchiSteamFarm.Steam.Integration;
using JetBrains.Annotations; using JetBrains.Annotations;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using SteamKit2; using SteamKit2;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Steam.Storage {
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
public sealed class BotConfig { public sealed class BotConfig {
[PublicAPI] [PublicAPI]

View file

@ -27,11 +27,13 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Collections; using ArchiSteamFarm.Collections;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Helpers; using ArchiSteamFarm.Helpers;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Steam.Security;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Steam.Storage {
internal sealed class BotDatabase : SerializableFile { internal sealed class BotDatabase : SerializableFile {
[JsonProperty(Required = Required.DisallowNull)] [JsonProperty(Required = Required.DisallowNull)]
internal readonly ConcurrentHashSet<ulong> BlacklistedFromTradesSteamIDs = new(); internal readonly ConcurrentHashSet<ulong> BlacklistedFromTradesSteamIDs = new();

View file

@ -28,13 +28,16 @@ using System.IO;
using System.Net; using System.Net;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Helpers;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Steam;
using JetBrains.Annotations; using JetBrains.Annotations;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using SteamKit2; using SteamKit2;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Storage {
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
public sealed class GlobalConfig { public sealed class GlobalConfig {
[PublicAPI] [PublicAPI]

View file

@ -33,13 +33,15 @@ using System.Globalization;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Helpers; using ArchiSteamFarm.Helpers;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.SteamKit2; using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Steam.SteamKit2;
using JetBrains.Annotations; using JetBrains.Annotations;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace ArchiSteamFarm { namespace ArchiSteamFarm.Storage {
public sealed class GlobalDatabase : SerializableFile { public sealed class GlobalDatabase : SerializableFile {
[JsonIgnore] [JsonIgnore]
[PublicAPI] [PublicAPI]

View file

@ -29,6 +29,7 @@ using System.Linq;
using System.Net; using System.Net;
using System.Threading.Tasks; using System.Threading.Tasks;
using AngleSharp.Dom; using AngleSharp.Dom;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Web.Responses; using ArchiSteamFarm.Web.Responses;
using Markdig; using Markdig;
using Markdig.Renderers; using Markdig.Renderers;

View file

@ -23,6 +23,7 @@ using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using AngleSharp; using AngleSharp;
using AngleSharp.Dom; using AngleSharp.Dom;
using ArchiSteamFarm.Core;
using JetBrains.Annotations; using JetBrains.Annotations;
namespace ArchiSteamFarm.Web.Responses { namespace ArchiSteamFarm.Web.Responses {

View file

@ -29,6 +29,7 @@ using System.Net.Http;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Xml; using System.Xml;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Localization; using ArchiSteamFarm.Localization;
using ArchiSteamFarm.NLog; using ArchiSteamFarm.NLog;
using ArchiSteamFarm.RuntimeCompatibility; using ArchiSteamFarm.RuntimeCompatibility;