diff --git a/ArchiSteamFarm.CustomPlugins.ExamplePlugin/CatController.cs b/ArchiSteamFarm.CustomPlugins.ExamplePlugin/CatController.cs index 25d35320f..f4ac0d4a6 100644 --- a/ArchiSteamFarm.CustomPlugins.ExamplePlugin/CatController.cs +++ b/ArchiSteamFarm.CustomPlugins.ExamplePlugin/CatController.cs @@ -22,6 +22,7 @@ using System; using System.Net; using System.Threading.Tasks; +using ArchiSteamFarm.Core; using ArchiSteamFarm.IPC.Controllers.Api; using ArchiSteamFarm.IPC.Responses; using Microsoft.AspNetCore.Mvc; diff --git a/ArchiSteamFarm.CustomPlugins.ExamplePlugin/ExamplePlugin.cs b/ArchiSteamFarm.CustomPlugins.ExamplePlugin/ExamplePlugin.cs index 84d1b7a62..f6c1d8976 100644 --- a/ArchiSteamFarm.CustomPlugins.ExamplePlugin/ExamplePlugin.cs +++ b/ArchiSteamFarm.CustomPlugins.ExamplePlugin/ExamplePlugin.cs @@ -27,8 +27,11 @@ using System.Collections.Generic; using System.Composition; using System.Linq; using System.Threading.Tasks; -using ArchiSteamFarm.Json; -using ArchiSteamFarm.Plugins; +using ArchiSteamFarm.Core; +using ArchiSteamFarm.Plugins.Interfaces; +using ArchiSteamFarm.Steam; +using ArchiSteamFarm.Steam.Data; +using ArchiSteamFarm.Steam.Storage; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using SteamKit2; diff --git a/ArchiSteamFarm.CustomPlugins.PeriodicGC/PeriodicGCPlugin.cs b/ArchiSteamFarm.CustomPlugins.PeriodicGC/PeriodicGCPlugin.cs index 4d8c0dffa..59ced47d4 100644 --- a/ArchiSteamFarm.CustomPlugins.PeriodicGC/PeriodicGCPlugin.cs +++ b/ArchiSteamFarm.CustomPlugins.PeriodicGC/PeriodicGCPlugin.cs @@ -24,7 +24,8 @@ using System.Composition; using System.Diagnostics.CodeAnalysis; using System.Runtime; using System.Threading; -using ArchiSteamFarm.Plugins; +using ArchiSteamFarm.Core; +using ArchiSteamFarm.Plugins.Interfaces; namespace ArchiSteamFarm.CustomPlugins.PeriodicGC { [Export(typeof(IPlugin))] diff --git a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs index 3284736f3..b7491f336 100644 --- a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs +++ b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs @@ -32,6 +32,7 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Threading.Tasks; +using ArchiSteamFarm.Core; using ArchiSteamFarm.Helpers; using ArchiSteamFarm.Localization; using Newtonsoft.Json; diff --git a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/RequestData.cs b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/RequestData.cs index daa3d5387..27cafeaf8 100644 --- a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/RequestData.cs +++ b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/RequestData.cs @@ -23,6 +23,7 @@ using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Globalization; +using ArchiSteamFarm.Core; using Newtonsoft.Json; using SteamKit2; diff --git a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs index ee3a39c01..0f1829e55 100644 --- a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs +++ b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs @@ -32,8 +32,11 @@ using System.Linq; using System.Net; using System.Threading; using System.Threading.Tasks; +using ArchiSteamFarm.Core; using ArchiSteamFarm.OfficialPlugins.SteamTokenDumper.Localization; using ArchiSteamFarm.Plugins; +using ArchiSteamFarm.Plugins.Interfaces; +using ArchiSteamFarm.Steam; using ArchiSteamFarm.Web; using ArchiSteamFarm.Web.Responses; using Newtonsoft.Json; diff --git a/ArchiSteamFarm.Tests/Bot.cs b/ArchiSteamFarm.Tests/Bot.cs index 815aefca9..7e0645415 100644 --- a/ArchiSteamFarm.Tests/Bot.cs +++ b/ArchiSteamFarm.Tests/Bot.cs @@ -25,7 +25,7 @@ using ArchiSteamFarm.RuntimeCompatibility; using System; using System.Collections.Generic; using System.Linq; -using ArchiSteamFarm.Json; +using ArchiSteamFarm.Steam.Data; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace ArchiSteamFarm.Tests { @@ -36,8 +36,8 @@ namespace ArchiSteamFarm.Tests { const uint relevantAppID = 42; Dictionary itemsPerSet = new() { - { relevantAppID, ArchiSteamFarm.Bot.MinCardsPerBadge }, - { 43, ArchiSteamFarm.Bot.MinCardsPerBadge + 1 } + { relevantAppID, Steam.Bot.MinCardsPerBadge }, + { 43, Steam.Bot.MinCardsPerBadge + 1 } }; HashSet items = new(); @@ -48,7 +48,7 @@ namespace ArchiSteamFarm.Tests { } } - HashSet itemsToSend = GetItemsForFullBadge(items, itemsPerSet, ArchiSteamFarm.Bot.MinCardsPerBadge); + HashSet itemsToSend = GetItemsForFullBadge(items, itemsPerSet, Steam.Bot.MinCardsPerBadge); Dictionary<(uint RealAppID, ulong ContextID, ulong ClassID), uint> expectedResult = items.Where(item => item.RealAppID == relevantAppID) .GroupBy(item => (item.RealAppID, item.ContextID, item.ClassID)) @@ -67,7 +67,7 @@ namespace ArchiSteamFarm.Tests { CreateCard(2, appID) }; - GetItemsForFullBadge(items, 2, appID, ArchiSteamFarm.Bot.MinCardsPerBadge - 1); + GetItemsForFullBadge(items, 2, appID, Steam.Bot.MinCardsPerBadge - 1); Assert.Fail(); } @@ -428,14 +428,14 @@ namespace ArchiSteamFarm.Tests { HashSet 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(2, appID)); } HashSet itemsToSend = GetItemsForFullBadge(items, 2, appID); - Assert.IsTrue(itemsToSend.Count <= ArchiSteamFarm.Trading.MaxItemsPerTrade); + Assert.IsTrue(itemsToSend.Count <= Steam.Exchange.Trading.MaxItemsPerTrade); } [TestMethod] @@ -459,7 +459,7 @@ namespace ArchiSteamFarm.Tests { HashSet itemsToSend = GetItemsForFullBadge(items, itemsPerSet); - Assert.IsTrue(itemsToSend.Count <= ArchiSteamFarm.Trading.MaxItemsPerTrade); + Assert.IsTrue(itemsToSend.Count <= Steam.Exchange.Trading.MaxItemsPerTrade); } [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 HashSet GetItemsForFullBadge(IReadOnlyCollection inventory, byte cardsPerSet, uint appID, ushort maxItems = ArchiSteamFarm.Trading.MaxItemsPerTrade) => GetItemsForFullBadge(inventory, new Dictionary { { appID, cardsPerSet } }, maxItems); + private static HashSet GetItemsForFullBadge(IReadOnlyCollection inventory, byte cardsPerSet, uint appID, ushort maxItems = Steam.Exchange.Trading.MaxItemsPerTrade) => GetItemsForFullBadge(inventory, new Dictionary { { appID, cardsPerSet } }, maxItems); - private static HashSet GetItemsForFullBadge(IReadOnlyCollection inventory, IDictionary cardsPerSet, ushort maxItems = ArchiSteamFarm.Trading.MaxItemsPerTrade) { - Dictionary<(uint RealAppID, Asset.EType Type, Asset.ERarity Rarity), List> inventorySets = ArchiSteamFarm.Trading.GetInventorySets(inventory); + private static HashSet GetItemsForFullBadge(IReadOnlyCollection inventory, IDictionary cardsPerSet, ushort maxItems = Steam.Exchange.Trading.MaxItemsPerTrade) { + Dictionary<(uint RealAppID, Asset.EType Type, Asset.ERarity Rarity), List> 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(); } } } diff --git a/ArchiSteamFarm.Tests/Trading.cs b/ArchiSteamFarm.Tests/Trading.cs index afeb01fa9..83d1c295c 100644 --- a/ArchiSteamFarm.Tests/Trading.cs +++ b/ArchiSteamFarm.Tests/Trading.cs @@ -20,9 +20,9 @@ // limitations under the License. using System.Collections.Generic; -using ArchiSteamFarm.Json; +using ArchiSteamFarm.Steam.Data; using Microsoft.VisualStudio.TestTools.UnitTesting; -using static ArchiSteamFarm.Trading; +using static ArchiSteamFarm.Steam.Exchange.Trading; namespace ArchiSteamFarm.Tests { [TestClass] diff --git a/ArchiSteamFarm/Collections/FixedSizeConcurrentQueue.cs b/ArchiSteamFarm/Collections/FixedSizeConcurrentQueue.cs index b34724800..e058d66fe 100644 --- a/ArchiSteamFarm/Collections/FixedSizeConcurrentQueue.cs +++ b/ArchiSteamFarm/Collections/FixedSizeConcurrentQueue.cs @@ -23,6 +23,7 @@ using System; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; +using ArchiSteamFarm.Core; namespace ArchiSteamFarm.Collections { internal sealed class FixedSizeConcurrentQueue : IEnumerable { diff --git a/ArchiSteamFarm/ASF.cs b/ArchiSteamFarm/Core/ASF.cs similarity index 99% rename from ArchiSteamFarm/ASF.cs rename to ArchiSteamFarm/Core/ASF.cs index e4a6858e7..96f402ee0 100644 --- a/ArchiSteamFarm/ASF.cs +++ b/ArchiSteamFarm/Core/ASF.cs @@ -44,13 +44,16 @@ using ArchiSteamFarm.IPC; using ArchiSteamFarm.Localization; using ArchiSteamFarm.NLog; using ArchiSteamFarm.Plugins; +using ArchiSteamFarm.Steam; +using ArchiSteamFarm.Steam.Integration; +using ArchiSteamFarm.Storage; using ArchiSteamFarm.Web; using ArchiSteamFarm.Web.Responses; using JetBrains.Annotations; using SteamKit2; using SteamKit2.Discovery; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Core { public static class ASF { // This is based on internal Valve guidelines, we're not using it as a hard limit private const byte MaximumRecommendedBotsCount = 10; diff --git a/ArchiSteamFarm/Debugging.cs b/ArchiSteamFarm/Core/Debugging.cs similarity index 98% rename from ArchiSteamFarm/Debugging.cs rename to ArchiSteamFarm/Core/Debugging.cs index aeba77dd4..717ec54e2 100644 --- a/ArchiSteamFarm/Debugging.cs +++ b/ArchiSteamFarm/Core/Debugging.cs @@ -22,7 +22,7 @@ using System; using SteamKit2; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Core { internal static class Debugging { #if DEBUG internal static bool IsDebugBuild => true; diff --git a/ArchiSteamFarm/Events.cs b/ArchiSteamFarm/Core/Events.cs similarity index 96% rename from ArchiSteamFarm/Events.cs rename to ArchiSteamFarm/Core/Events.cs index 78d27dab6..b14c2c8bc 100644 --- a/ArchiSteamFarm/Events.cs +++ b/ArchiSteamFarm/Core/Events.cs @@ -22,8 +22,9 @@ using System.Linq; using System.Threading.Tasks; using ArchiSteamFarm.Localization; +using ArchiSteamFarm.Steam; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Core { internal static class Events { internal static async Task OnBotShutdown() { if (Program.ProcessRequired || ((Bot.Bots != null) && Bot.Bots.Values.Any(bot => bot.KeepRunning))) { diff --git a/ArchiSteamFarm/OS.cs b/ArchiSteamFarm/Core/OS.cs similarity index 99% rename from ArchiSteamFarm/OS.cs rename to ArchiSteamFarm/Core/OS.cs index 57daa8b1c..9300068bd 100644 --- a/ArchiSteamFarm/OS.cs +++ b/ArchiSteamFarm/Core/OS.cs @@ -34,9 +34,10 @@ using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using ArchiSteamFarm.Localization; +using ArchiSteamFarm.Storage; using ArchiSteamFarm.Web; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Core { internal static class OS { // 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)); diff --git a/ArchiSteamFarm/Statistics.cs b/ArchiSteamFarm/Core/Statistics.cs similarity index 99% rename from ArchiSteamFarm/Statistics.cs rename to ArchiSteamFarm/Core/Statistics.cs index 8700e8a02..f31781864 100644 --- a/ArchiSteamFarm/Statistics.cs +++ b/ArchiSteamFarm/Core/Statistics.cs @@ -31,13 +31,20 @@ using System.Linq; using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using ArchiSteamFarm.Json; 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.Responses; using Newtonsoft.Json; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Core { 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 byte MaxMatchedBotsHard = 40; // Determines how many bots we can attempt to match in total, where match attempt is equal to analyzing bot's inventory diff --git a/ArchiSteamFarm/Utilities.cs b/ArchiSteamFarm/Core/Utilities.cs similarity index 99% rename from ArchiSteamFarm/Utilities.cs rename to ArchiSteamFarm/Core/Utilities.cs index 0f31915ca..616e31752 100644 --- a/ArchiSteamFarm/Utilities.cs +++ b/ArchiSteamFarm/Core/Utilities.cs @@ -29,12 +29,13 @@ using System.Threading; using System.Threading.Tasks; using AngleSharp.Dom; using AngleSharp.XPath; +using ArchiSteamFarm.Storage; using Humanizer; using Humanizer.Localisation; using JetBrains.Annotations; using SteamKit2; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Core { public static class Utilities { private const byte TimeoutForLongRunningTasksInSeconds = 60; diff --git a/ArchiSteamFarm/ArchiCryptoHelper.cs b/ArchiSteamFarm/Helpers/ArchiCryptoHelper.cs similarity index 99% rename from ArchiSteamFarm/ArchiCryptoHelper.cs rename to ArchiSteamFarm/Helpers/ArchiCryptoHelper.cs index 1ad0f8b26..113f6b915 100644 --- a/ArchiSteamFarm/ArchiCryptoHelper.cs +++ b/ArchiSteamFarm/Helpers/ArchiCryptoHelper.cs @@ -26,10 +26,11 @@ using System.Linq; using System.Runtime.InteropServices; using System.Security.Cryptography; using System.Text; +using ArchiSteamFarm.Core; using CryptSharp.Utility; using SteamKit2; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Helpers { public static class ArchiCryptoHelper { private const byte DefaultHashLength = 32; private const ushort SteamParentalPbkdf2Iterations = 10000; diff --git a/ArchiSteamFarm/Helpers/CrossProcessFileBasedSemaphore.cs b/ArchiSteamFarm/Helpers/CrossProcessFileBasedSemaphore.cs index 41ab9e80e..50de67afb 100644 --- a/ArchiSteamFarm/Helpers/CrossProcessFileBasedSemaphore.cs +++ b/ArchiSteamFarm/Helpers/CrossProcessFileBasedSemaphore.cs @@ -26,6 +26,7 @@ using System.Runtime.InteropServices; using System.Security.AccessControl; using System.Threading; using System.Threading.Tasks; +using ArchiSteamFarm.Core; namespace ArchiSteamFarm.Helpers { internal sealed class CrossProcessFileBasedSemaphore : ICrossProcessSemaphore, IDisposable { diff --git a/ArchiSteamFarm/Helpers/SerializableFile.cs b/ArchiSteamFarm/Helpers/SerializableFile.cs index 5d2f94109..281dd42d9 100644 --- a/ArchiSteamFarm/Helpers/SerializableFile.cs +++ b/ArchiSteamFarm/Helpers/SerializableFile.cs @@ -22,6 +22,7 @@ using System; using System.Threading; using System.Threading.Tasks; +using ArchiSteamFarm.Core; using ArchiSteamFarm.RuntimeCompatibility; using Newtonsoft.Json; diff --git a/ArchiSteamFarm/IPC/ArchiKestrel.cs b/ArchiSteamFarm/IPC/ArchiKestrel.cs index 65ec24507..ea9dac0dd 100644 --- a/ArchiSteamFarm/IPC/ArchiKestrel.cs +++ b/ArchiSteamFarm/IPC/ArchiKestrel.cs @@ -29,9 +29,11 @@ using Microsoft.Extensions.Hosting; using System; using System.IO; using System.Threading.Tasks; +using ArchiSteamFarm.Core; using ArchiSteamFarm.IPC.Controllers.Api; using ArchiSteamFarm.Localization; using ArchiSteamFarm.NLog; +using ArchiSteamFarm.NLog.Targets; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; diff --git a/ArchiSteamFarm/IPC/Controllers/Api/ASFController.cs b/ArchiSteamFarm/IPC/Controllers/Api/ASFController.cs index 757bff2dd..3129cae78 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/ASFController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/ASFController.cs @@ -25,10 +25,13 @@ using System.Globalization; using System.Linq; using System.Net; using System.Threading.Tasks; +using ArchiSteamFarm.Core; using ArchiSteamFarm.IPC.Requests; using ArchiSteamFarm.IPC.Responses; using ArchiSteamFarm.Localization; using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Steam.Interaction; +using ArchiSteamFarm.Storage; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json.Linq; diff --git a/ArchiSteamFarm/IPC/Controllers/Api/ArchiController.cs b/ArchiSteamFarm/IPC/Controllers/Api/ArchiController.cs index 837845e4e..b6bdf42ed 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/ArchiController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/ArchiController.cs @@ -21,6 +21,7 @@ using System.Net; using ArchiSteamFarm.IPC.Responses; +using ArchiSteamFarm.Storage; using Microsoft.AspNetCore.Mvc; using Swashbuckle.AspNetCore.Annotations; diff --git a/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs b/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs index 07741ef0a..0dcde6f52 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs @@ -29,10 +29,14 @@ using System.Globalization; using System.Linq; using System.Net; using System.Threading.Tasks; -using ArchiSteamFarm.Callbacks; +using ArchiSteamFarm.Core; using ArchiSteamFarm.IPC.Requests; using ArchiSteamFarm.IPC.Responses; using ArchiSteamFarm.Localization; +using ArchiSteamFarm.Steam; +using ArchiSteamFarm.Steam.Integration.Callbacks; +using ArchiSteamFarm.Steam.Security; +using ArchiSteamFarm.Steam.Storage; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json.Linq; diff --git a/ArchiSteamFarm/IPC/Controllers/Api/CommandController.cs b/ArchiSteamFarm/IPC/Controllers/Api/CommandController.cs index e3346adff..88e424e3f 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/CommandController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/CommandController.cs @@ -24,9 +24,12 @@ using System.Globalization; using System.Linq; using System.Net; using System.Threading.Tasks; +using ArchiSteamFarm.Core; using ArchiSteamFarm.IPC.Requests; using ArchiSteamFarm.IPC.Responses; using ArchiSteamFarm.Localization; +using ArchiSteamFarm.Steam; +using ArchiSteamFarm.Storage; using Microsoft.AspNetCore.Mvc; namespace ArchiSteamFarm.IPC.Controllers.Api { diff --git a/ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs b/ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs index 4d54d25db..264581888 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs @@ -32,9 +32,10 @@ using System.Net.WebSockets; using System.Text; using System.Threading; using System.Threading.Tasks; +using ArchiSteamFarm.Core; using ArchiSteamFarm.IPC.Responses; using ArchiSteamFarm.Localization; -using ArchiSteamFarm.NLog; +using ArchiSteamFarm.NLog.Targets; using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; diff --git a/ArchiSteamFarm/IPC/Controllers/Api/PluginsController.cs b/ArchiSteamFarm/IPC/Controllers/Api/PluginsController.cs index 5d9f3994b..74c82a5b3 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/PluginsController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/PluginsController.cs @@ -24,6 +24,7 @@ using System.Collections.Generic; using System.Net; using ArchiSteamFarm.IPC.Responses; using ArchiSteamFarm.Plugins; +using ArchiSteamFarm.Plugins.Interfaces; using Microsoft.AspNetCore.Mvc; namespace ArchiSteamFarm.IPC.Controllers.Api { diff --git a/ArchiSteamFarm/IPC/Controllers/Api/TypeController.cs b/ArchiSteamFarm/IPC/Controllers/Api/TypeController.cs index ec32e8d4f..54d59788f 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/TypeController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/TypeController.cs @@ -25,6 +25,7 @@ using System.Globalization; using System.Linq; using System.Net; using System.Reflection; +using ArchiSteamFarm.Core; using ArchiSteamFarm.IPC.Responses; using ArchiSteamFarm.Localization; using Microsoft.AspNetCore.Mvc; diff --git a/ArchiSteamFarm/IPC/Integration/ApiAuthenticationMiddleware.cs b/ArchiSteamFarm/IPC/Integration/ApiAuthenticationMiddleware.cs index e1c05c18b..c994cbc89 100644 --- a/ArchiSteamFarm/IPC/Integration/ApiAuthenticationMiddleware.cs +++ b/ArchiSteamFarm/IPC/Integration/ApiAuthenticationMiddleware.cs @@ -26,6 +26,9 @@ using System.Linq; using System.Net; using System.Threading; using System.Threading.Tasks; +using ArchiSteamFarm.Core; +using ArchiSteamFarm.Helpers; +using ArchiSteamFarm.Storage; using JetBrains.Annotations; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Primitives; diff --git a/ArchiSteamFarm/IPC/Requests/ASFEncryptRequest.cs b/ArchiSteamFarm/IPC/Requests/ASFEncryptRequest.cs index bdeb218e5..890a43e74 100644 --- a/ArchiSteamFarm/IPC/Requests/ASFEncryptRequest.cs +++ b/ArchiSteamFarm/IPC/Requests/ASFEncryptRequest.cs @@ -21,6 +21,7 @@ using System.ComponentModel.DataAnnotations; using System.Diagnostics.CodeAnalysis; +using ArchiSteamFarm.Helpers; using Newtonsoft.Json; namespace ArchiSteamFarm.IPC.Requests { diff --git a/ArchiSteamFarm/IPC/Requests/ASFHashRequest.cs b/ArchiSteamFarm/IPC/Requests/ASFHashRequest.cs index 8401dce8c..c512fa241 100644 --- a/ArchiSteamFarm/IPC/Requests/ASFHashRequest.cs +++ b/ArchiSteamFarm/IPC/Requests/ASFHashRequest.cs @@ -21,6 +21,7 @@ using System.ComponentModel.DataAnnotations; using System.Diagnostics.CodeAnalysis; +using ArchiSteamFarm.Helpers; using Newtonsoft.Json; namespace ArchiSteamFarm.IPC.Requests { diff --git a/ArchiSteamFarm/IPC/Requests/ASFRequest.cs b/ArchiSteamFarm/IPC/Requests/ASFRequest.cs index e1f08d953..ea1fdbd4f 100644 --- a/ArchiSteamFarm/IPC/Requests/ASFRequest.cs +++ b/ArchiSteamFarm/IPC/Requests/ASFRequest.cs @@ -21,6 +21,7 @@ using System.ComponentModel.DataAnnotations; using System.Diagnostics.CodeAnalysis; +using ArchiSteamFarm.Storage; using Newtonsoft.Json; namespace ArchiSteamFarm.IPC.Requests { diff --git a/ArchiSteamFarm/IPC/Requests/BotInputRequest.cs b/ArchiSteamFarm/IPC/Requests/BotInputRequest.cs index 313ef8815..d1093ed81 100644 --- a/ArchiSteamFarm/IPC/Requests/BotInputRequest.cs +++ b/ArchiSteamFarm/IPC/Requests/BotInputRequest.cs @@ -20,6 +20,7 @@ // limitations under the License. using System.Diagnostics.CodeAnalysis; +using ArchiSteamFarm.Core; using Newtonsoft.Json; namespace ArchiSteamFarm.IPC.Requests { diff --git a/ArchiSteamFarm/IPC/Requests/BotRequest.cs b/ArchiSteamFarm/IPC/Requests/BotRequest.cs index d9d5c49ef..4f95a5f71 100644 --- a/ArchiSteamFarm/IPC/Requests/BotRequest.cs +++ b/ArchiSteamFarm/IPC/Requests/BotRequest.cs @@ -21,6 +21,7 @@ using System.ComponentModel.DataAnnotations; using System.Diagnostics.CodeAnalysis; +using ArchiSteamFarm.Steam.Storage; using Newtonsoft.Json; namespace ArchiSteamFarm.IPC.Requests { diff --git a/ArchiSteamFarm/IPC/Requests/TwoFactorAuthenticationConfirmationsRequest.cs b/ArchiSteamFarm/IPC/Requests/TwoFactorAuthenticationConfirmationsRequest.cs index 2debfb340..2678bfae4 100644 --- a/ArchiSteamFarm/IPC/Requests/TwoFactorAuthenticationConfirmationsRequest.cs +++ b/ArchiSteamFarm/IPC/Requests/TwoFactorAuthenticationConfirmationsRequest.cs @@ -25,7 +25,9 @@ using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; +using ArchiSteamFarm.Core; using ArchiSteamFarm.Localization; +using ArchiSteamFarm.Steam.Security; using Newtonsoft.Json; namespace ArchiSteamFarm.IPC.Requests { diff --git a/ArchiSteamFarm/IPC/Responses/ASFResponse.cs b/ArchiSteamFarm/IPC/Responses/ASFResponse.cs index 29b6cb781..59cf7f7c7 100644 --- a/ArchiSteamFarm/IPC/Responses/ASFResponse.cs +++ b/ArchiSteamFarm/IPC/Responses/ASFResponse.cs @@ -21,6 +21,7 @@ using System; using System.ComponentModel.DataAnnotations; +using ArchiSteamFarm.Storage; using Newtonsoft.Json; namespace ArchiSteamFarm.IPC.Responses { diff --git a/ArchiSteamFarm/IPC/Startup.cs b/ArchiSteamFarm/IPC/Startup.cs index 27621f983..52944a4c1 100644 --- a/ArchiSteamFarm/IPC/Startup.cs +++ b/ArchiSteamFarm/IPC/Startup.cs @@ -32,9 +32,11 @@ using System.Collections.Generic; using System.Globalization; using System.Net; using System.Reflection; +using ArchiSteamFarm.Core; using ArchiSteamFarm.IPC.Integration; using ArchiSteamFarm.Localization; using ArchiSteamFarm.Plugins; +using ArchiSteamFarm.Storage; using JetBrains.Annotations; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; diff --git a/ArchiSteamFarm/NLog/ArchiLogger.cs b/ArchiSteamFarm/NLog/ArchiLogger.cs index fc31b845c..ab05ee52d 100644 --- a/ArchiSteamFarm/NLog/ArchiLogger.cs +++ b/ArchiSteamFarm/NLog/ArchiLogger.cs @@ -24,6 +24,7 @@ using System.Globalization; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; +using ArchiSteamFarm.Core; using ArchiSteamFarm.Localization; using ArchiSteamFarm.RuntimeCompatibility; using JetBrains.Annotations; diff --git a/ArchiSteamFarm/NLog/Logging.cs b/ArchiSteamFarm/NLog/Logging.cs index 380d31a99..60a59dfaa 100644 --- a/ArchiSteamFarm/NLog/Logging.cs +++ b/ArchiSteamFarm/NLog/Logging.cs @@ -28,8 +28,12 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using ArchiSteamFarm.Collections; +using ArchiSteamFarm.Core; using ArchiSteamFarm.IPC; using ArchiSteamFarm.Localization; +using ArchiSteamFarm.NLog.Targets; +using ArchiSteamFarm.Steam; +using ArchiSteamFarm.Storage; using NLog; using NLog.Config; using NLog.Targets; diff --git a/ArchiSteamFarm/NLog/HistoryTarget.cs b/ArchiSteamFarm/NLog/Targets/HistoryTarget.cs similarity index 97% rename from ArchiSteamFarm/NLog/HistoryTarget.cs rename to ArchiSteamFarm/NLog/Targets/HistoryTarget.cs index f34fd30e8..c430d4535 100644 --- a/ArchiSteamFarm/NLog/HistoryTarget.cs +++ b/ArchiSteamFarm/NLog/Targets/HistoryTarget.cs @@ -22,11 +22,12 @@ using System; using System.Collections.Generic; using ArchiSteamFarm.Collections; +using ArchiSteamFarm.Core; using JetBrains.Annotations; using NLog; using NLog.Targets; -namespace ArchiSteamFarm.NLog { +namespace ArchiSteamFarm.NLog.Targets { [Target(TargetName)] internal sealed class HistoryTarget : TargetWithLayout { internal const string TargetName = "History"; diff --git a/ArchiSteamFarm/NLog/SteamTarget.cs b/ArchiSteamFarm/NLog/Targets/SteamTarget.cs similarity index 98% rename from ArchiSteamFarm/NLog/SteamTarget.cs rename to ArchiSteamFarm/NLog/Targets/SteamTarget.cs index d0cf5ee6d..273b7ad91 100644 --- a/ArchiSteamFarm/NLog/SteamTarget.cs +++ b/ArchiSteamFarm/NLog/Targets/SteamTarget.cs @@ -26,13 +26,14 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using ArchiSteamFarm.Localization; +using ArchiSteamFarm.Steam; using JetBrains.Annotations; using NLog; using NLog.Config; using NLog.Layouts; using NLog.Targets; -namespace ArchiSteamFarm.NLog { +namespace ArchiSteamFarm.NLog.Targets { [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] [Target(TargetName)] internal sealed class SteamTarget : AsyncTaskTarget { diff --git a/ArchiSteamFarm/Plugins/IASF.cs b/ArchiSteamFarm/Plugins/Interfaces/IASF.cs similarity index 97% rename from ArchiSteamFarm/Plugins/IASF.cs rename to ArchiSteamFarm/Plugins/Interfaces/IASF.cs index 2ab99ea05..aa12bfd8a 100644 --- a/ArchiSteamFarm/Plugins/IASF.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IASF.cs @@ -24,7 +24,7 @@ using JetBrains.Annotations; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -namespace ArchiSteamFarm.Plugins { +namespace ArchiSteamFarm.Plugins.Interfaces { [PublicAPI] public interface IASF : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/IBot.cs b/ArchiSteamFarm/Plugins/Interfaces/IBot.cs similarity index 96% rename from ArchiSteamFarm/Plugins/IBot.cs rename to ArchiSteamFarm/Plugins/Interfaces/IBot.cs index d689ae973..486f19d9a 100644 --- a/ArchiSteamFarm/Plugins/IBot.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBot.cs @@ -19,9 +19,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using ArchiSteamFarm.Steam; using JetBrains.Annotations; -namespace ArchiSteamFarm.Plugins { +namespace ArchiSteamFarm.Plugins.Interfaces { [PublicAPI] public interface IBot : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/IBotCardsFarmerInfo.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotCardsFarmerInfo.cs similarity index 97% rename from ArchiSteamFarm/Plugins/IBotCardsFarmerInfo.cs rename to ArchiSteamFarm/Plugins/Interfaces/IBotCardsFarmerInfo.cs index c83a8896f..4579a20f7 100644 --- a/ArchiSteamFarm/Plugins/IBotCardsFarmerInfo.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotCardsFarmerInfo.cs @@ -19,9 +19,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using ArchiSteamFarm.Steam; using JetBrains.Annotations; -namespace ArchiSteamFarm.Plugins { +namespace ArchiSteamFarm.Plugins.Interfaces { [PublicAPI] public interface IBotCardsFarmerInfo : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/IBotCommand.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotCommand.cs similarity index 94% rename from ArchiSteamFarm/Plugins/IBotCommand.cs rename to ArchiSteamFarm/Plugins/Interfaces/IBotCommand.cs index 8f1bd72ed..b0f42a1c3 100644 --- a/ArchiSteamFarm/Plugins/IBotCommand.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotCommand.cs @@ -20,9 +20,11 @@ // limitations under the License. using System.Threading.Tasks; +using ArchiSteamFarm.Steam; +using ArchiSteamFarm.Storage; using JetBrains.Annotations; -namespace ArchiSteamFarm.Plugins { +namespace ArchiSteamFarm.Plugins.Interfaces { [PublicAPI] public interface IBotCommand : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/IBotConnection.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotConnection.cs similarity index 96% rename from ArchiSteamFarm/Plugins/IBotConnection.cs rename to ArchiSteamFarm/Plugins/Interfaces/IBotConnection.cs index b09733845..4825045a1 100644 --- a/ArchiSteamFarm/Plugins/IBotConnection.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotConnection.cs @@ -19,10 +19,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using ArchiSteamFarm.Steam; using JetBrains.Annotations; using SteamKit2; -namespace ArchiSteamFarm.Plugins { +namespace ArchiSteamFarm.Plugins.Interfaces { [PublicAPI] public interface IBotConnection : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/IBotFriendRequest.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotFriendRequest.cs similarity index 96% rename from ArchiSteamFarm/Plugins/IBotFriendRequest.cs rename to ArchiSteamFarm/Plugins/Interfaces/IBotFriendRequest.cs index e7167d5bc..8af0f142f 100644 --- a/ArchiSteamFarm/Plugins/IBotFriendRequest.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotFriendRequest.cs @@ -20,9 +20,10 @@ // limitations under the License. using System.Threading.Tasks; +using ArchiSteamFarm.Steam; using JetBrains.Annotations; -namespace ArchiSteamFarm.Plugins { +namespace ArchiSteamFarm.Plugins.Interfaces { [PublicAPI] public interface IBotFriendRequest : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/IBotMessage.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotMessage.cs similarity index 94% rename from ArchiSteamFarm/Plugins/IBotMessage.cs rename to ArchiSteamFarm/Plugins/Interfaces/IBotMessage.cs index 51577b70e..370e03b09 100644 --- a/ArchiSteamFarm/Plugins/IBotMessage.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotMessage.cs @@ -20,9 +20,11 @@ // limitations under the License. using System.Threading.Tasks; +using ArchiSteamFarm.Steam; +using ArchiSteamFarm.Storage; using JetBrains.Annotations; -namespace ArchiSteamFarm.Plugins { +namespace ArchiSteamFarm.Plugins.Interfaces { [PublicAPI] public interface IBotMessage : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/IBotModules.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotModules.cs similarity index 95% rename from ArchiSteamFarm/Plugins/IBotModules.cs rename to ArchiSteamFarm/Plugins/Interfaces/IBotModules.cs index 5889ebe23..18b2d27f8 100644 --- a/ArchiSteamFarm/Plugins/IBotModules.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotModules.cs @@ -20,11 +20,12 @@ // limitations under the License. using System.Collections.Generic; +using ArchiSteamFarm.Steam; using JetBrains.Annotations; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -namespace ArchiSteamFarm.Plugins { +namespace ArchiSteamFarm.Plugins.Interfaces { [PublicAPI] public interface IBotModules : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/IBotSteamClient.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotSteamClient.cs similarity index 96% rename from ArchiSteamFarm/Plugins/IBotSteamClient.cs rename to ArchiSteamFarm/Plugins/Interfaces/IBotSteamClient.cs index 484e268a1..7a6429a36 100644 --- a/ArchiSteamFarm/Plugins/IBotSteamClient.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotSteamClient.cs @@ -20,10 +20,11 @@ // limitations under the License. using System.Collections.Generic; +using ArchiSteamFarm.Steam; using JetBrains.Annotations; using SteamKit2; -namespace ArchiSteamFarm.Plugins { +namespace ArchiSteamFarm.Plugins.Interfaces { [PublicAPI] public interface IBotSteamClient : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/IBotTradeOffer.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOffer.cs similarity index 94% rename from ArchiSteamFarm/Plugins/IBotTradeOffer.cs rename to ArchiSteamFarm/Plugins/Interfaces/IBotTradeOffer.cs index b08c70464..ff017f53b 100644 --- a/ArchiSteamFarm/Plugins/IBotTradeOffer.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOffer.cs @@ -20,10 +20,11 @@ // limitations under the License. using System.Threading.Tasks; -using ArchiSteamFarm.Json; +using ArchiSteamFarm.Steam; +using ArchiSteamFarm.Steam.Data; using JetBrains.Annotations; -namespace ArchiSteamFarm.Plugins { +namespace ArchiSteamFarm.Plugins.Interfaces { [PublicAPI] public interface IBotTradeOffer : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/IBotTradeOfferResults.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOfferResults.cs similarity index 93% rename from ArchiSteamFarm/Plugins/IBotTradeOfferResults.cs rename to ArchiSteamFarm/Plugins/Interfaces/IBotTradeOfferResults.cs index 7175075f0..5d61753be 100644 --- a/ArchiSteamFarm/Plugins/IBotTradeOfferResults.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotTradeOfferResults.cs @@ -20,9 +20,11 @@ // limitations under the License. using System.Collections.Generic; +using ArchiSteamFarm.Steam; +using ArchiSteamFarm.Steam.Exchange; using JetBrains.Annotations; -namespace ArchiSteamFarm.Plugins { +namespace ArchiSteamFarm.Plugins.Interfaces { [PublicAPI] public interface IBotTradeOfferResults : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/IBotUserNotifications.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotUserNotifications.cs similarity index 93% rename from ArchiSteamFarm/Plugins/IBotUserNotifications.cs rename to ArchiSteamFarm/Plugins/Interfaces/IBotUserNotifications.cs index 0c8033b49..9dddf1fb7 100644 --- a/ArchiSteamFarm/Plugins/IBotUserNotifications.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotUserNotifications.cs @@ -20,10 +20,11 @@ // limitations under the License. using System.Collections.Generic; -using ArchiSteamFarm.Callbacks; +using ArchiSteamFarm.Steam; +using ArchiSteamFarm.Steam.Integration.Callbacks; using JetBrains.Annotations; -namespace ArchiSteamFarm.Plugins { +namespace ArchiSteamFarm.Plugins.Interfaces { [PublicAPI] public interface IBotUserNotifications : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/IBotsComparer.cs b/ArchiSteamFarm/Plugins/Interfaces/IBotsComparer.cs similarity index 97% rename from ArchiSteamFarm/Plugins/IBotsComparer.cs rename to ArchiSteamFarm/Plugins/Interfaces/IBotsComparer.cs index 72ca6ce81..5238cdc80 100644 --- a/ArchiSteamFarm/Plugins/IBotsComparer.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IBotsComparer.cs @@ -22,7 +22,7 @@ using System; using JetBrains.Annotations; -namespace ArchiSteamFarm.Plugins { +namespace ArchiSteamFarm.Plugins.Interfaces { [PublicAPI] public interface IBotsComparer : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/ICrossProcessSemaphoreProvider.cs b/ArchiSteamFarm/Plugins/Interfaces/ICrossProcessSemaphoreProvider.cs similarity index 97% rename from ArchiSteamFarm/Plugins/ICrossProcessSemaphoreProvider.cs rename to ArchiSteamFarm/Plugins/Interfaces/ICrossProcessSemaphoreProvider.cs index b09e72b18..509015488 100644 --- a/ArchiSteamFarm/Plugins/ICrossProcessSemaphoreProvider.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/ICrossProcessSemaphoreProvider.cs @@ -23,7 +23,7 @@ using System.Threading.Tasks; using ArchiSteamFarm.Helpers; using JetBrains.Annotations; -namespace ArchiSteamFarm.Plugins { +namespace ArchiSteamFarm.Plugins.Interfaces { [PublicAPI] public interface ICrossProcessSemaphoreProvider : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/IPlugin.cs b/ArchiSteamFarm/Plugins/Interfaces/IPlugin.cs similarity index 97% rename from ArchiSteamFarm/Plugins/IPlugin.cs rename to ArchiSteamFarm/Plugins/Interfaces/IPlugin.cs index f6a0056f5..3c124111c 100644 --- a/ArchiSteamFarm/Plugins/IPlugin.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/IPlugin.cs @@ -23,7 +23,7 @@ using System; using JetBrains.Annotations; using Newtonsoft.Json; -namespace ArchiSteamFarm.Plugins { +namespace ArchiSteamFarm.Plugins.Interfaces { [PublicAPI] public interface IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/ISteamPICSChanges.cs b/ArchiSteamFarm/Plugins/Interfaces/ISteamPICSChanges.cs similarity index 98% rename from ArchiSteamFarm/Plugins/ISteamPICSChanges.cs rename to ArchiSteamFarm/Plugins/Interfaces/ISteamPICSChanges.cs index 2e18e3d66..f391df081 100644 --- a/ArchiSteamFarm/Plugins/ISteamPICSChanges.cs +++ b/ArchiSteamFarm/Plugins/Interfaces/ISteamPICSChanges.cs @@ -24,7 +24,7 @@ using System.Threading.Tasks; using JetBrains.Annotations; using SteamKit2; -namespace ArchiSteamFarm.Plugins { +namespace ArchiSteamFarm.Plugins.Interfaces { [PublicAPI] public interface ISteamPICSChanges : IPlugin { /// diff --git a/ArchiSteamFarm/Plugins/OfficialPlugin.cs b/ArchiSteamFarm/Plugins/OfficialPlugin.cs index 64f54aada..9ae23de45 100644 --- a/ArchiSteamFarm/Plugins/OfficialPlugin.cs +++ b/ArchiSteamFarm/Plugins/OfficialPlugin.cs @@ -20,6 +20,7 @@ // limitations under the License. using System; +using ArchiSteamFarm.Plugins.Interfaces; namespace ArchiSteamFarm.Plugins { internal abstract class OfficialPlugin : IPlugin { diff --git a/ArchiSteamFarm/Plugins/PluginsCore.cs b/ArchiSteamFarm/Plugins/PluginsCore.cs index dbda5584f..92fdd01ce 100644 --- a/ArchiSteamFarm/Plugins/PluginsCore.cs +++ b/ArchiSteamFarm/Plugins/PluginsCore.cs @@ -30,10 +30,14 @@ using System.IO; using System.Linq; using System.Reflection; using System.Threading.Tasks; -using ArchiSteamFarm.Callbacks; +using ArchiSteamFarm.Core; using ArchiSteamFarm.Helpers; -using ArchiSteamFarm.Json; 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 SteamKit2; diff --git a/ArchiSteamFarm/Program.cs b/ArchiSteamFarm/Program.cs index 2136aae6a..a95995607 100644 --- a/ArchiSteamFarm/Program.cs +++ b/ArchiSteamFarm/Program.cs @@ -28,9 +28,14 @@ using System.IO; using System.Linq; using System.Resources; using System.Threading.Tasks; +using ArchiSteamFarm.Core; +using ArchiSteamFarm.Helpers; using ArchiSteamFarm.IPC; using ArchiSteamFarm.Localization; using ArchiSteamFarm.NLog; +using ArchiSteamFarm.NLog.Targets; +using ArchiSteamFarm.Steam; +using ArchiSteamFarm.Storage; using ArchiSteamFarm.Web; using Newtonsoft.Json; using NLog; diff --git a/ArchiSteamFarm/SharedInfo.cs b/ArchiSteamFarm/SharedInfo.cs index 83b7c42d4..c56045bb4 100644 --- a/ArchiSteamFarm/SharedInfo.cs +++ b/ArchiSteamFarm/SharedInfo.cs @@ -22,6 +22,7 @@ using System; using System.IO; using System.Reflection; +using ArchiSteamFarm.Core; using ArchiSteamFarm.Plugins; using JetBrains.Annotations; diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Steam/Bot.cs old mode 100755 new mode 100644 similarity index 99% rename from ArchiSteamFarm/Bot.cs rename to ArchiSteamFarm/Steam/Bot.cs index 44e53e8f1..4155685ca --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Steam/Bot.cs @@ -40,19 +40,28 @@ using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using AngleSharp.Dom; -using ArchiSteamFarm.Callbacks; using ArchiSteamFarm.Collections; -using ArchiSteamFarm.Json; +using ArchiSteamFarm.Core; +using ArchiSteamFarm.Helpers; using ArchiSteamFarm.Localization; using ArchiSteamFarm.NLog; 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 JetBrains.Annotations; using Newtonsoft.Json; using SteamKit2; using SteamKit2.Internal; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Steam { public sealed class Bot : IAsyncDisposable { 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) diff --git a/ArchiSteamFarm/Json/Asset.cs b/ArchiSteamFarm/Steam/Data/Asset.cs similarity index 99% rename from ArchiSteamFarm/Json/Asset.cs rename to ArchiSteamFarm/Steam/Data/Asset.cs index 05d35bd6d..769cc902f 100644 --- a/ArchiSteamFarm/Json/Asset.cs +++ b/ArchiSteamFarm/Steam/Data/Asset.cs @@ -23,11 +23,12 @@ using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Globalization; +using ArchiSteamFarm.Core; using JetBrains.Annotations; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -namespace ArchiSteamFarm.Json { +namespace ArchiSteamFarm.Steam.Data { // REF: https://developer.valvesoftware.com/wiki/Steam_Web_API/IEconService#CEcon_Asset public sealed class Asset { [PublicAPI] diff --git a/ArchiSteamFarm/Json/BooleanResponse.cs b/ArchiSteamFarm/Steam/Data/BooleanResponse.cs similarity index 97% rename from ArchiSteamFarm/Json/BooleanResponse.cs rename to ArchiSteamFarm/Steam/Data/BooleanResponse.cs index 2f89c5f5d..8a47188cb 100644 --- a/ArchiSteamFarm/Json/BooleanResponse.cs +++ b/ArchiSteamFarm/Steam/Data/BooleanResponse.cs @@ -23,7 +23,7 @@ using System.Diagnostics.CodeAnalysis; using JetBrains.Annotations; using Newtonsoft.Json; -namespace ArchiSteamFarm.Json { +namespace ArchiSteamFarm.Steam.Data { [PublicAPI] [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] public class BooleanResponse { diff --git a/ArchiSteamFarm/Json/EResultResponse.cs b/ArchiSteamFarm/Steam/Data/EResultResponse.cs similarity index 97% rename from ArchiSteamFarm/Json/EResultResponse.cs rename to ArchiSteamFarm/Steam/Data/EResultResponse.cs index 20a0b11ae..864a3d796 100644 --- a/ArchiSteamFarm/Json/EResultResponse.cs +++ b/ArchiSteamFarm/Steam/Data/EResultResponse.cs @@ -24,7 +24,7 @@ using JetBrains.Annotations; using Newtonsoft.Json; using SteamKit2; -namespace ArchiSteamFarm.Json { +namespace ArchiSteamFarm.Steam.Data { [PublicAPI] [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] public class EResultResponse { diff --git a/ArchiSteamFarm/Json/InventoryResponse.cs b/ArchiSteamFarm/Steam/Data/InventoryResponse.cs similarity index 99% rename from ArchiSteamFarm/Json/InventoryResponse.cs rename to ArchiSteamFarm/Steam/Data/InventoryResponse.cs index 898a9e4f6..79c694fc1 100644 --- a/ArchiSteamFarm/Json/InventoryResponse.cs +++ b/ArchiSteamFarm/Steam/Data/InventoryResponse.cs @@ -24,12 +24,13 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; using System.Globalization; +using ArchiSteamFarm.Core; using ArchiSteamFarm.Localization; using JetBrains.Annotations; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -namespace ArchiSteamFarm.Json { +namespace ArchiSteamFarm.Steam.Data { [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] internal sealed class InventoryResponse : EResultResponse { [JsonProperty(PropertyName = "assets", Required = Required.DisallowNull)] diff --git a/ArchiSteamFarm/Json/NewDiscoveryQueueResponse.cs b/ArchiSteamFarm/Steam/Data/NewDiscoveryQueueResponse.cs similarity index 97% rename from ArchiSteamFarm/Json/NewDiscoveryQueueResponse.cs rename to ArchiSteamFarm/Steam/Data/NewDiscoveryQueueResponse.cs index c3684e968..6b96e57d5 100644 --- a/ArchiSteamFarm/Json/NewDiscoveryQueueResponse.cs +++ b/ArchiSteamFarm/Steam/Data/NewDiscoveryQueueResponse.cs @@ -23,7 +23,7 @@ using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; using Newtonsoft.Json; -namespace ArchiSteamFarm.Json { +namespace ArchiSteamFarm.Steam.Data { [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] internal sealed class NewDiscoveryQueueResponse { [JsonProperty(PropertyName = "queue", Required = Required.Always)] diff --git a/ArchiSteamFarm/Json/RedeemWalletResponse.cs b/ArchiSteamFarm/Steam/Data/RedeemWalletResponse.cs similarity index 97% rename from ArchiSteamFarm/Json/RedeemWalletResponse.cs rename to ArchiSteamFarm/Steam/Data/RedeemWalletResponse.cs index 9f354b4db..ac239ae77 100644 --- a/ArchiSteamFarm/Json/RedeemWalletResponse.cs +++ b/ArchiSteamFarm/Steam/Data/RedeemWalletResponse.cs @@ -23,7 +23,7 @@ using System.Diagnostics.CodeAnalysis; using Newtonsoft.Json; using SteamKit2; -namespace ArchiSteamFarm.Json { +namespace ArchiSteamFarm.Steam.Data { [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] internal sealed class RedeemWalletResponse : EResultResponse { [JsonProperty(PropertyName = "detail", Required = Required.DisallowNull)] diff --git a/ArchiSteamFarm/Json/Tag.cs b/ArchiSteamFarm/Steam/Data/Tag.cs similarity index 97% rename from ArchiSteamFarm/Json/Tag.cs rename to ArchiSteamFarm/Steam/Data/Tag.cs index ef50edc29..79c8b0508 100644 --- a/ArchiSteamFarm/Json/Tag.cs +++ b/ArchiSteamFarm/Steam/Data/Tag.cs @@ -23,7 +23,7 @@ using System; using JetBrains.Annotations; using Newtonsoft.Json; -namespace ArchiSteamFarm.Json { +namespace ArchiSteamFarm.Steam.Data { public sealed class Tag { [JsonProperty(PropertyName = "category", Required = Required.Always)] [PublicAPI] diff --git a/ArchiSteamFarm/Json/TradeOffer.cs b/ArchiSteamFarm/Steam/Data/TradeOffer.cs similarity index 98% rename from ArchiSteamFarm/Json/TradeOffer.cs rename to ArchiSteamFarm/Steam/Data/TradeOffer.cs index 8ecdf01e5..d98a8ca23 100644 --- a/ArchiSteamFarm/Json/TradeOffer.cs +++ b/ArchiSteamFarm/Steam/Data/TradeOffer.cs @@ -26,7 +26,7 @@ using System.Linq; using JetBrains.Annotations; using SteamKit2; -namespace ArchiSteamFarm.Json { +namespace ArchiSteamFarm.Steam.Data { // REF: https://developer.valvesoftware.com/wiki/Steam_Web_API/IEconService#CEcon_TradeOffer public sealed class TradeOffer { [PublicAPI] diff --git a/ArchiSteamFarm/Json/TradeOfferAcceptResponse.cs b/ArchiSteamFarm/Steam/Data/TradeOfferAcceptResponse.cs similarity index 97% rename from ArchiSteamFarm/Json/TradeOfferAcceptResponse.cs rename to ArchiSteamFarm/Steam/Data/TradeOfferAcceptResponse.cs index aa3a5623d..7589525c4 100644 --- a/ArchiSteamFarm/Json/TradeOfferAcceptResponse.cs +++ b/ArchiSteamFarm/Steam/Data/TradeOfferAcceptResponse.cs @@ -22,7 +22,7 @@ using System.Diagnostics.CodeAnalysis; using Newtonsoft.Json; -namespace ArchiSteamFarm.Json { +namespace ArchiSteamFarm.Steam.Data { [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] internal sealed class TradeOfferAcceptResponse { [JsonProperty(PropertyName = "strError", Required = Required.DisallowNull)] diff --git a/ArchiSteamFarm/Json/TradeOfferSendRequest.cs b/ArchiSteamFarm/Steam/Data/TradeOfferSendRequest.cs similarity index 97% rename from ArchiSteamFarm/Json/TradeOfferSendRequest.cs rename to ArchiSteamFarm/Steam/Data/TradeOfferSendRequest.cs index c29700bbf..41a5d50e8 100644 --- a/ArchiSteamFarm/Json/TradeOfferSendRequest.cs +++ b/ArchiSteamFarm/Steam/Data/TradeOfferSendRequest.cs @@ -22,7 +22,7 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace ArchiSteamFarm.Json { +namespace ArchiSteamFarm.Steam.Data { internal sealed class TradeOfferSendRequest { [JsonProperty(PropertyName = "me", Required = Required.Always)] internal readonly ItemList ItemsToGive = new(); diff --git a/ArchiSteamFarm/Json/TradeOfferSendResponse.cs b/ArchiSteamFarm/Steam/Data/TradeOfferSendResponse.cs similarity index 97% rename from ArchiSteamFarm/Json/TradeOfferSendResponse.cs rename to ArchiSteamFarm/Steam/Data/TradeOfferSendResponse.cs index f5c881cd7..6d4792d74 100644 --- a/ArchiSteamFarm/Json/TradeOfferSendResponse.cs +++ b/ArchiSteamFarm/Steam/Data/TradeOfferSendResponse.cs @@ -20,9 +20,10 @@ // limitations under the License. using System.Diagnostics.CodeAnalysis; +using ArchiSteamFarm.Core; using Newtonsoft.Json; -namespace ArchiSteamFarm.Json { +namespace ArchiSteamFarm.Steam.Data { [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] internal sealed class TradeOfferSendResponse { [JsonProperty(PropertyName = "strError", Required = Required.DisallowNull)] diff --git a/ArchiSteamFarm/Json/UserPrivacy.cs b/ArchiSteamFarm/Steam/Data/UserPrivacy.cs similarity index 98% rename from ArchiSteamFarm/Json/UserPrivacy.cs rename to ArchiSteamFarm/Steam/Data/UserPrivacy.cs index c37006e8a..c52b4f2c1 100644 --- a/ArchiSteamFarm/Json/UserPrivacy.cs +++ b/ArchiSteamFarm/Steam/Data/UserPrivacy.cs @@ -22,9 +22,10 @@ using System; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; +using ArchiSteamFarm.Steam.Integration; using Newtonsoft.Json; -namespace ArchiSteamFarm.Json { +namespace ArchiSteamFarm.Steam.Data { [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] internal sealed class UserPrivacy { [JsonProperty(PropertyName = "eCommentPermission", Required = Required.Always)] diff --git a/ArchiSteamFarm/ParseTradeResult.cs b/ArchiSteamFarm/Steam/Exchange/ParseTradeResult.cs similarity index 96% rename from ArchiSteamFarm/ParseTradeResult.cs rename to ArchiSteamFarm/Steam/Exchange/ParseTradeResult.cs index d214b4cff..d4b35b98f 100644 --- a/ArchiSteamFarm/ParseTradeResult.cs +++ b/ArchiSteamFarm/Steam/Exchange/ParseTradeResult.cs @@ -24,10 +24,10 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.ComponentModel; using System.Linq; -using ArchiSteamFarm.Json; +using ArchiSteamFarm.Steam.Data; using JetBrains.Annotations; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Steam.Exchange { public sealed class ParseTradeResult { [PublicAPI] public EResult Result { get; } diff --git a/ArchiSteamFarm/Trading.cs b/ArchiSteamFarm/Steam/Exchange/Trading.cs similarity index 99% rename from ArchiSteamFarm/Trading.cs rename to ArchiSteamFarm/Steam/Exchange/Trading.cs index d34bb8fee..0aecd633a 100644 --- a/ArchiSteamFarm/Trading.cs +++ b/ArchiSteamFarm/Steam/Exchange/Trading.cs @@ -30,13 +30,17 @@ using System.Net.Http; using System.Threading; using System.Threading.Tasks; using ArchiSteamFarm.Collections; -using ArchiSteamFarm.Json; +using ArchiSteamFarm.Core; using ArchiSteamFarm.Localization; using ArchiSteamFarm.Plugins; +using ArchiSteamFarm.Steam.Data; +using ArchiSteamFarm.Steam.Idling; +using ArchiSteamFarm.Steam.Security; +using ArchiSteamFarm.Steam.Storage; using JetBrains.Annotations; using SteamKit2; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Steam.Exchange { 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 MaxTradesPerAccount = 5; // This is limit introduced by Valve diff --git a/ArchiSteamFarm/CardsFarmer.cs b/ArchiSteamFarm/Steam/Idling/CardsFarmer.cs old mode 100755 new mode 100644 similarity index 99% rename from ArchiSteamFarm/CardsFarmer.cs rename to ArchiSteamFarm/Steam/Idling/CardsFarmer.cs index 86ac79bce..4339eeaba --- a/ArchiSteamFarm/CardsFarmer.cs +++ b/ArchiSteamFarm/Steam/Idling/CardsFarmer.cs @@ -34,13 +34,17 @@ using System.Threading; using System.Threading.Tasks; using AngleSharp.Dom; using ArchiSteamFarm.Collections; +using ArchiSteamFarm.Core; using ArchiSteamFarm.Localization; using ArchiSteamFarm.Plugins; +using ArchiSteamFarm.Steam.Integration; +using ArchiSteamFarm.Steam.Storage; +using ArchiSteamFarm.Storage; using JetBrains.Annotations; using Newtonsoft.Json; using SteamKit2; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Steam.Idling { public sealed class CardsFarmer : IAsyncDisposable { 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 diff --git a/ArchiSteamFarm/Game.cs b/ArchiSteamFarm/Steam/Idling/Game.cs similarity index 98% rename from ArchiSteamFarm/Game.cs rename to ArchiSteamFarm/Steam/Idling/Game.cs index 8115e6fb4..409d67427 100644 --- a/ArchiSteamFarm/Game.cs +++ b/ArchiSteamFarm/Steam/Idling/Game.cs @@ -25,7 +25,7 @@ using HashCode = ArchiSteamFarm.RuntimeCompatibility.HashCode; using System; using Newtonsoft.Json; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Steam.Idling { public sealed class Game : IEquatable { [JsonProperty] public uint AppID { get; } diff --git a/ArchiSteamFarm/ArchiHandler.cs b/ArchiSteamFarm/Steam/Integration/ArchiHandler.cs similarity index 99% rename from ArchiSteamFarm/ArchiHandler.cs rename to ArchiSteamFarm/Steam/Integration/ArchiHandler.cs index 8a52dc50c..558af88c2 100644 --- a/ArchiSteamFarm/ArchiHandler.cs +++ b/ArchiSteamFarm/Steam/Integration/ArchiHandler.cs @@ -24,14 +24,15 @@ using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Threading.Tasks; -using ArchiSteamFarm.Callbacks; -using ArchiSteamFarm.CMsgs; +using ArchiSteamFarm.Core; using ArchiSteamFarm.NLog; +using ArchiSteamFarm.Steam.Integration.Callbacks; +using ArchiSteamFarm.Steam.Integration.CMsgs; using JetBrains.Annotations; using SteamKit2; using SteamKit2.Internal; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Steam.Integration { public sealed class ArchiHandler : ClientMsgHandler { internal const byte MaxGamesPlayedConcurrently = 32; // This is limit introduced by Steam Network diff --git a/ArchiSteamFarm/ArchiWebHandler.cs b/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs similarity index 99% rename from ArchiSteamFarm/ArchiWebHandler.cs rename to ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs index 8eb3e3a60..abc78b7b9 100644 --- a/ArchiSteamFarm/ArchiWebHandler.cs +++ b/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs @@ -36,9 +36,14 @@ using System.Threading; using System.Threading.Tasks; using System.Xml; using AngleSharp.Dom; +using ArchiSteamFarm.Core; using ArchiSteamFarm.Helpers; -using ArchiSteamFarm.Json; 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.Responses; using JetBrains.Annotations; @@ -47,7 +52,7 @@ using Newtonsoft.Json.Linq; using SteamKit2; using Formatting = Newtonsoft.Json.Formatting; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Steam.Integration { public sealed class ArchiWebHandler : IDisposable { internal const ushort MaxItemsInSingleInventoryRequest = 5000; diff --git a/ArchiSteamFarm/CMsgs/CMsgClientAcknowledgeClanInvite.cs b/ArchiSteamFarm/Steam/Integration/CMsgs/CMsgClientAcknowledgeClanInvite.cs similarity index 97% rename from ArchiSteamFarm/CMsgs/CMsgClientAcknowledgeClanInvite.cs rename to ArchiSteamFarm/Steam/Integration/CMsgs/CMsgClientAcknowledgeClanInvite.cs index c7d8137a5..29dba8a83 100644 --- a/ArchiSteamFarm/CMsgs/CMsgClientAcknowledgeClanInvite.cs +++ b/ArchiSteamFarm/Steam/Integration/CMsgs/CMsgClientAcknowledgeClanInvite.cs @@ -25,7 +25,7 @@ using System.Text; using SteamKit2; using SteamKit2.Internal; -namespace ArchiSteamFarm.CMsgs { +namespace ArchiSteamFarm.Steam.Integration.CMsgs { internal sealed class CMsgClientAcknowledgeClanInvite : ISteamSerializableMessage { internal bool AcceptInvite { private get; set; } internal ulong ClanID { private get; set; } diff --git a/ArchiSteamFarm/Callbacks/PurchaseResponseCallback.cs b/ArchiSteamFarm/Steam/Integration/Callbacks/PurchaseResponseCallback.cs similarity index 97% rename from ArchiSteamFarm/Callbacks/PurchaseResponseCallback.cs rename to ArchiSteamFarm/Steam/Integration/Callbacks/PurchaseResponseCallback.cs index 99bc7bb49..2547f7081 100644 --- a/ArchiSteamFarm/Callbacks/PurchaseResponseCallback.cs +++ b/ArchiSteamFarm/Steam/Integration/Callbacks/PurchaseResponseCallback.cs @@ -24,11 +24,12 @@ using System.Collections.Generic; using System.ComponentModel; using System.IO; using System.Net; +using ArchiSteamFarm.Core; using JetBrains.Annotations; using SteamKit2; using SteamKit2.Internal; -namespace ArchiSteamFarm.Callbacks { +namespace ArchiSteamFarm.Steam.Integration.Callbacks { public sealed class PurchaseResponseCallback : CallbackMsg { [PublicAPI] public Dictionary? Items { get; } diff --git a/ArchiSteamFarm/Callbacks/UserNotificationsCallback.cs b/ArchiSteamFarm/Steam/Integration/Callbacks/UserNotificationsCallback.cs similarity index 97% rename from ArchiSteamFarm/Callbacks/UserNotificationsCallback.cs rename to ArchiSteamFarm/Steam/Integration/Callbacks/UserNotificationsCallback.cs index 083359a8f..d2e87471b 100644 --- a/ArchiSteamFarm/Callbacks/UserNotificationsCallback.cs +++ b/ArchiSteamFarm/Steam/Integration/Callbacks/UserNotificationsCallback.cs @@ -22,12 +22,13 @@ using System; using System.Collections.Generic; using System.Globalization; +using ArchiSteamFarm.Core; using ArchiSteamFarm.Localization; using JetBrains.Annotations; using SteamKit2; using SteamKit2.Internal; -namespace ArchiSteamFarm.Callbacks { +namespace ArchiSteamFarm.Steam.Integration.Callbacks { public sealed class UserNotificationsCallback : CallbackMsg { internal readonly Dictionary Notifications; diff --git a/ArchiSteamFarm/SteamPICSChanges.cs b/ArchiSteamFarm/Steam/Integration/SteamPICSChanges.cs similarity index 98% rename from ArchiSteamFarm/SteamPICSChanges.cs rename to ArchiSteamFarm/Steam/Integration/SteamPICSChanges.cs index f85152255..c4131a844 100644 --- a/ArchiSteamFarm/SteamPICSChanges.cs +++ b/ArchiSteamFarm/Steam/Integration/SteamPICSChanges.cs @@ -22,12 +22,13 @@ using System; using System.Linq; using System.Threading; +using ArchiSteamFarm.Core; using ArchiSteamFarm.Localization; using ArchiSteamFarm.Plugins; using ArchiSteamFarm.Web; using SteamKit2; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Steam.Integration { internal static class SteamPICSChanges { private const byte RefreshTimerInMinutes = 5; diff --git a/ArchiSteamFarm/SteamSaleEvent.cs b/ArchiSteamFarm/Steam/Integration/SteamSaleEvent.cs similarity index 98% rename from ArchiSteamFarm/SteamSaleEvent.cs rename to ArchiSteamFarm/Steam/Integration/SteamSaleEvent.cs index 736d762ef..cec46ee06 100644 --- a/ArchiSteamFarm/SteamSaleEvent.cs +++ b/ArchiSteamFarm/Steam/Integration/SteamSaleEvent.cs @@ -28,9 +28,10 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; using AngleSharp.Dom; +using ArchiSteamFarm.Core; using ArchiSteamFarm.Localization; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Steam.Integration { 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) diff --git a/ArchiSteamFarm/Actions.cs b/ArchiSteamFarm/Steam/Interaction/Actions.cs similarity index 98% rename from ArchiSteamFarm/Actions.cs rename to ArchiSteamFarm/Steam/Interaction/Actions.cs index 3402a125e..2b4a4604e 100644 --- a/ArchiSteamFarm/Actions.cs +++ b/ArchiSteamFarm/Steam/Interaction/Actions.cs @@ -30,16 +30,22 @@ using System.Linq; using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using ArchiSteamFarm.Callbacks; using ArchiSteamFarm.Collections; +using ArchiSteamFarm.Core; using ArchiSteamFarm.Helpers; -using ArchiSteamFarm.Json; 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 JetBrains.Annotations; using SteamKit2; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Steam.Interaction { public sealed class Actions : IAsyncDisposable { private static readonly SemaphoreSlim GiftCardsSemaphore = new(1, 1); diff --git a/ArchiSteamFarm/Commands.cs b/ArchiSteamFarm/Steam/Interaction/Commands.cs similarity index 99% rename from ArchiSteamFarm/Commands.cs rename to ArchiSteamFarm/Steam/Interaction/Commands.cs index bfd440504..1627a40f4 100644 --- a/ArchiSteamFarm/Commands.cs +++ b/ArchiSteamFarm/Steam/Interaction/Commands.cs @@ -27,15 +27,21 @@ using System.Net.Http; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; -using ArchiSteamFarm.Callbacks; -using ArchiSteamFarm.Json; +using ArchiSteamFarm.Core; +using ArchiSteamFarm.Helpers; using ArchiSteamFarm.Localization; using ArchiSteamFarm.Plugins; 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 SteamKit2; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Steam.Interaction { public sealed class Commands { private const ushort SteamTypingStatusDelay = 10 * 1000; // Steam client broadcasts typing status each 10 seconds diff --git a/ArchiSteamFarm/Confirmation.cs b/ArchiSteamFarm/Steam/Security/Confirmation.cs similarity index 98% rename from ArchiSteamFarm/Confirmation.cs rename to ArchiSteamFarm/Steam/Security/Confirmation.cs index 6125965d3..ae86b4d25 100644 --- a/ArchiSteamFarm/Confirmation.cs +++ b/ArchiSteamFarm/Steam/Security/Confirmation.cs @@ -24,7 +24,7 @@ using System.ComponentModel; using JetBrains.Annotations; using Newtonsoft.Json; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Steam.Security { public sealed class Confirmation { [JsonProperty(Required = Required.Always)] public ulong Creator { get; } diff --git a/ArchiSteamFarm/MobileAuthenticator.cs b/ArchiSteamFarm/Steam/Security/MobileAuthenticator.cs similarity index 99% rename from ArchiSteamFarm/MobileAuthenticator.cs rename to ArchiSteamFarm/Steam/Security/MobileAuthenticator.cs index b596182d2..15593afd2 100644 --- a/ArchiSteamFarm/MobileAuthenticator.cs +++ b/ArchiSteamFarm/Steam/Security/MobileAuthenticator.cs @@ -29,11 +29,13 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using AngleSharp.Dom; +using ArchiSteamFarm.Core; using ArchiSteamFarm.Helpers; using ArchiSteamFarm.Localization; +using ArchiSteamFarm.Storage; using Newtonsoft.Json; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Steam.Security { [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] public sealed class MobileAuthenticator : IDisposable { internal const byte BackupCodeDigits = 7; diff --git a/ArchiSteamFarm/SteamKit2/InMemoryServerListProvider.cs b/ArchiSteamFarm/Steam/SteamKit2/InMemoryServerListProvider.cs similarity index 98% rename from ArchiSteamFarm/SteamKit2/InMemoryServerListProvider.cs rename to ArchiSteamFarm/Steam/SteamKit2/InMemoryServerListProvider.cs index 0e752233a..57f4897b9 100644 --- a/ArchiSteamFarm/SteamKit2/InMemoryServerListProvider.cs +++ b/ArchiSteamFarm/Steam/SteamKit2/InMemoryServerListProvider.cs @@ -27,7 +27,7 @@ using ArchiSteamFarm.Collections; using Newtonsoft.Json; using SteamKit2.Discovery; -namespace ArchiSteamFarm.SteamKit2 { +namespace ArchiSteamFarm.Steam.SteamKit2 { internal sealed class InMemoryServerListProvider : IServerListProvider { [JsonProperty(Required = Required.DisallowNull)] private readonly ConcurrentHashSet ServerRecords = new(); diff --git a/ArchiSteamFarm/SteamKit2/ServerRecordEndPoint.cs b/ArchiSteamFarm/Steam/SteamKit2/ServerRecordEndPoint.cs similarity index 98% rename from ArchiSteamFarm/SteamKit2/ServerRecordEndPoint.cs rename to ArchiSteamFarm/Steam/SteamKit2/ServerRecordEndPoint.cs index e76f8fc55..0729208df 100644 --- a/ArchiSteamFarm/SteamKit2/ServerRecordEndPoint.cs +++ b/ArchiSteamFarm/Steam/SteamKit2/ServerRecordEndPoint.cs @@ -27,7 +27,7 @@ using System.ComponentModel; using Newtonsoft.Json; using SteamKit2; -namespace ArchiSteamFarm.SteamKit2 { +namespace ArchiSteamFarm.Steam.SteamKit2 { internal sealed class ServerRecordEndPoint : IEquatable { [JsonProperty(Required = Required.Always)] internal readonly string Host = ""; diff --git a/ArchiSteamFarm/BotConfig.cs b/ArchiSteamFarm/Steam/Storage/BotConfig.cs similarity index 99% rename from ArchiSteamFarm/BotConfig.cs rename to ArchiSteamFarm/Steam/Storage/BotConfig.cs index b809e60da..bf77e74ca 100644 --- a/ArchiSteamFarm/BotConfig.cs +++ b/ArchiSteamFarm/Steam/Storage/BotConfig.cs @@ -27,15 +27,18 @@ using System.Globalization; using System.Linq; using System.Threading; using System.Threading.Tasks; -using ArchiSteamFarm.Json; +using ArchiSteamFarm.Core; +using ArchiSteamFarm.Helpers; using ArchiSteamFarm.Localization; using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Steam.Data; +using ArchiSteamFarm.Steam.Integration; using JetBrains.Annotations; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using SteamKit2; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Steam.Storage { [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] public sealed class BotConfig { [PublicAPI] diff --git a/ArchiSteamFarm/BotDatabase.cs b/ArchiSteamFarm/Steam/Storage/BotDatabase.cs similarity index 98% rename from ArchiSteamFarm/BotDatabase.cs rename to ArchiSteamFarm/Steam/Storage/BotDatabase.cs index 1a8c608ad..85cfebb03 100644 --- a/ArchiSteamFarm/BotDatabase.cs +++ b/ArchiSteamFarm/Steam/Storage/BotDatabase.cs @@ -27,11 +27,13 @@ using System.IO; using System.Linq; using System.Threading.Tasks; using ArchiSteamFarm.Collections; +using ArchiSteamFarm.Core; using ArchiSteamFarm.Helpers; using ArchiSteamFarm.Localization; +using ArchiSteamFarm.Steam.Security; using Newtonsoft.Json; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Steam.Storage { internal sealed class BotDatabase : SerializableFile { [JsonProperty(Required = Required.DisallowNull)] internal readonly ConcurrentHashSet BlacklistedFromTradesSteamIDs = new(); diff --git a/ArchiSteamFarm/GlobalConfig.cs b/ArchiSteamFarm/Storage/GlobalConfig.cs similarity index 99% rename from ArchiSteamFarm/GlobalConfig.cs rename to ArchiSteamFarm/Storage/GlobalConfig.cs index 80c8ac6e6..bedd64cf4 100644 --- a/ArchiSteamFarm/GlobalConfig.cs +++ b/ArchiSteamFarm/Storage/GlobalConfig.cs @@ -28,13 +28,16 @@ using System.IO; using System.Net; using System.Threading; using System.Threading.Tasks; +using ArchiSteamFarm.Core; +using ArchiSteamFarm.Helpers; using ArchiSteamFarm.Localization; +using ArchiSteamFarm.Steam; using JetBrains.Annotations; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using SteamKit2; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Storage { [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] public sealed class GlobalConfig { [PublicAPI] diff --git a/ArchiSteamFarm/GlobalDatabase.cs b/ArchiSteamFarm/Storage/GlobalDatabase.cs similarity index 98% rename from ArchiSteamFarm/GlobalDatabase.cs rename to ArchiSteamFarm/Storage/GlobalDatabase.cs index 9e05dc478..e312184c9 100644 --- a/ArchiSteamFarm/GlobalDatabase.cs +++ b/ArchiSteamFarm/Storage/GlobalDatabase.cs @@ -33,13 +33,15 @@ using System.Globalization; using System.Linq; using System.Threading; using System.Threading.Tasks; +using ArchiSteamFarm.Core; using ArchiSteamFarm.Helpers; using ArchiSteamFarm.Localization; -using ArchiSteamFarm.SteamKit2; +using ArchiSteamFarm.Steam; +using ArchiSteamFarm.Steam.SteamKit2; using JetBrains.Annotations; using Newtonsoft.Json; -namespace ArchiSteamFarm { +namespace ArchiSteamFarm.Storage { public sealed class GlobalDatabase : SerializableFile { [JsonIgnore] [PublicAPI] diff --git a/ArchiSteamFarm/Web/GitHub.cs b/ArchiSteamFarm/Web/GitHub.cs index c7d0e339b..47ae3831f 100644 --- a/ArchiSteamFarm/Web/GitHub.cs +++ b/ArchiSteamFarm/Web/GitHub.cs @@ -29,6 +29,7 @@ using System.Linq; using System.Net; using System.Threading.Tasks; using AngleSharp.Dom; +using ArchiSteamFarm.Core; using ArchiSteamFarm.Web.Responses; using Markdig; using Markdig.Renderers; diff --git a/ArchiSteamFarm/Web/Responses/HtmlDocumentResponse.cs b/ArchiSteamFarm/Web/Responses/HtmlDocumentResponse.cs index 2dcbd5aa3..51a41ba7d 100644 --- a/ArchiSteamFarm/Web/Responses/HtmlDocumentResponse.cs +++ b/ArchiSteamFarm/Web/Responses/HtmlDocumentResponse.cs @@ -23,6 +23,7 @@ using System; using System.Threading.Tasks; using AngleSharp; using AngleSharp.Dom; +using ArchiSteamFarm.Core; using JetBrains.Annotations; namespace ArchiSteamFarm.Web.Responses { diff --git a/ArchiSteamFarm/Web/WebBrowser.cs b/ArchiSteamFarm/Web/WebBrowser.cs index 6de0cef73..d48e0b0e9 100644 --- a/ArchiSteamFarm/Web/WebBrowser.cs +++ b/ArchiSteamFarm/Web/WebBrowser.cs @@ -29,6 +29,7 @@ using System.Net.Http; using System.Text; using System.Threading.Tasks; using System.Xml; +using ArchiSteamFarm.Core; using ArchiSteamFarm.Localization; using ArchiSteamFarm.NLog; using ArchiSteamFarm.RuntimeCompatibility;