From d21d2473fe0bbf1f94f87ab85791b3cf0eb5bddb Mon Sep 17 00:00:00 2001 From: JustArchi Date: Sat, 8 May 2021 01:43:08 +0200 Subject: [PATCH] RuntimeCompatibility -> Compatibility --- .../ExamplePlugin.cs | 2 +- .../GlobalCache.cs | 4 ++-- .../SteamTokenDumperPlugin.cs | 2 +- ArchiSteamFarm.Tests/Bot.cs | 2 +- .../{RuntimeCompatibility => Compatibility}/File.cs | 2 +- .../HashCode.cs | 2 +- .../{RuntimeCompatibility => Compatibility}/Path.cs | 2 +- .../PathInternalNetCore.cs | 2 +- .../StaticHelpers.cs | 2 +- ArchiSteamFarm/Core/ASF.cs | 10 +++++----- ArchiSteamFarm/Core/OS.cs | 2 +- ArchiSteamFarm/Core/Statistics.cs | 2 +- ArchiSteamFarm/Helpers/SerializableFile.cs | 2 +- ArchiSteamFarm/IPC/ArchiKestrel.cs | 4 ++-- ArchiSteamFarm/IPC/Controllers/Api/ASFController.cs | 2 +- ArchiSteamFarm/IPC/Controllers/Api/BotController.cs | 2 +- ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs | 2 +- ArchiSteamFarm/IPC/Startup.cs | 2 +- ArchiSteamFarm/IPC/WebUtilities.cs | 2 +- ArchiSteamFarm/NLog/ArchiLogger.cs | 2 +- ArchiSteamFarm/Steam/Bot.cs | 8 ++++---- ArchiSteamFarm/Steam/Exchange/Trading.cs | 2 +- ArchiSteamFarm/Steam/Idling/CardsFarmer.cs | 2 +- ArchiSteamFarm/Steam/Idling/Game.cs | 2 +- ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs | 2 +- ArchiSteamFarm/Steam/Integration/SteamSaleEvent.cs | 2 +- ArchiSteamFarm/Steam/Interaction/Actions.cs | 2 +- ArchiSteamFarm/Steam/Interaction/Commands.cs | 2 +- ArchiSteamFarm/Steam/SteamKit2/ServerRecordEndPoint.cs | 2 +- ArchiSteamFarm/Steam/Storage/BotConfig.cs | 2 +- ArchiSteamFarm/Steam/Storage/BotDatabase.cs | 2 +- ArchiSteamFarm/Storage/GlobalConfig.cs | 4 ++-- ArchiSteamFarm/Storage/GlobalDatabase.cs | 4 ++-- ArchiSteamFarm/Web/Responses/StreamResponse.cs | 2 +- ArchiSteamFarm/Web/WebBrowser.cs | 2 +- 35 files changed, 46 insertions(+), 46 deletions(-) rename ArchiSteamFarm/{RuntimeCompatibility => Compatibility}/File.cs (98%) rename ArchiSteamFarm/{RuntimeCompatibility => Compatibility}/HashCode.cs (96%) rename ArchiSteamFarm/{RuntimeCompatibility => Compatibility}/Path.cs (98%) rename ArchiSteamFarm/{RuntimeCompatibility => Compatibility}/PathInternalNetCore.cs (99%) rename ArchiSteamFarm/{RuntimeCompatibility => Compatibility}/StaticHelpers.cs (99%) diff --git a/ArchiSteamFarm.CustomPlugins.ExamplePlugin/ExamplePlugin.cs b/ArchiSteamFarm.CustomPlugins.ExamplePlugin/ExamplePlugin.cs index f6c1d8976..7c87ebf48 100644 --- a/ArchiSteamFarm.CustomPlugins.ExamplePlugin/ExamplePlugin.cs +++ b/ArchiSteamFarm.CustomPlugins.ExamplePlugin/ExamplePlugin.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; #endif using System; using System.Collections.Generic; diff --git a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs index b7491f336..6f82d9276 100644 --- a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs +++ b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; using File = System.IO.File; using Path = System.IO.Path; #else @@ -86,7 +86,7 @@ namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper { GlobalCache? globalCache; try { - string json = await RuntimeCompatibility.File.ReadAllTextAsync(SharedFilePath).ConfigureAwait(false); + string json = await Compatibility.File.ReadAllTextAsync(SharedFilePath).ConfigureAwait(false); if (string.IsNullOrEmpty(json)) { ASF.ArchiLogger.LogGenericError(string.Format(CultureInfo.CurrentCulture, Strings.ErrorIsEmpty, nameof(json))); diff --git a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs index 0f1829e55..a79bd358c 100644 --- a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs +++ b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; #endif using System; using System.Collections.Concurrent; diff --git a/ArchiSteamFarm.Tests/Bot.cs b/ArchiSteamFarm.Tests/Bot.cs index 7e0645415..7f75c6ffa 100644 --- a/ArchiSteamFarm.Tests/Bot.cs +++ b/ArchiSteamFarm.Tests/Bot.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; #endif using System; using System.Collections.Generic; diff --git a/ArchiSteamFarm/RuntimeCompatibility/File.cs b/ArchiSteamFarm/Compatibility/File.cs similarity index 98% rename from ArchiSteamFarm/RuntimeCompatibility/File.cs rename to ArchiSteamFarm/Compatibility/File.cs index df10781c0..3805b1f2e 100644 --- a/ArchiSteamFarm/RuntimeCompatibility/File.cs +++ b/ArchiSteamFarm/Compatibility/File.cs @@ -22,7 +22,7 @@ using System.Threading.Tasks; using JetBrains.Annotations; -namespace ArchiSteamFarm.RuntimeCompatibility { +namespace ArchiSteamFarm.Compatibility { [PublicAPI] public static class File { public static Task AppendAllTextAsync(string path, string contents) { diff --git a/ArchiSteamFarm/RuntimeCompatibility/HashCode.cs b/ArchiSteamFarm/Compatibility/HashCode.cs similarity index 96% rename from ArchiSteamFarm/RuntimeCompatibility/HashCode.cs rename to ArchiSteamFarm/Compatibility/HashCode.cs index 61e8d7779..8f6888200 100644 --- a/ArchiSteamFarm/RuntimeCompatibility/HashCode.cs +++ b/ArchiSteamFarm/Compatibility/HashCode.cs @@ -21,7 +21,7 @@ using JetBrains.Annotations; -namespace ArchiSteamFarm.RuntimeCompatibility { +namespace ArchiSteamFarm.Compatibility { [PublicAPI] public static class HashCode { public static int Combine(T1 value1, T2 value2, T3 value3) => diff --git a/ArchiSteamFarm/RuntimeCompatibility/Path.cs b/ArchiSteamFarm/Compatibility/Path.cs similarity index 98% rename from ArchiSteamFarm/RuntimeCompatibility/Path.cs rename to ArchiSteamFarm/Compatibility/Path.cs index 825d5fc19..a10b29ade 100644 --- a/ArchiSteamFarm/RuntimeCompatibility/Path.cs +++ b/ArchiSteamFarm/Compatibility/Path.cs @@ -25,7 +25,7 @@ using System.Text; #endif using JetBrains.Annotations; -namespace ArchiSteamFarm.RuntimeCompatibility { +namespace ArchiSteamFarm.Compatibility { [PublicAPI] public static class Path { public static string GetRelativePath(string relativeTo, string path) { diff --git a/ArchiSteamFarm/RuntimeCompatibility/PathInternalNetCore.cs b/ArchiSteamFarm/Compatibility/PathInternalNetCore.cs similarity index 99% rename from ArchiSteamFarm/RuntimeCompatibility/PathInternalNetCore.cs rename to ArchiSteamFarm/Compatibility/PathInternalNetCore.cs index f5ae1d872..afc51b612 100644 --- a/ArchiSteamFarm/RuntimeCompatibility/PathInternalNetCore.cs +++ b/ArchiSteamFarm/Compatibility/PathInternalNetCore.cs @@ -24,7 +24,7 @@ using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -namespace ArchiSteamFarm.RuntimeCompatibility { +namespace ArchiSteamFarm.Compatibility { internal static class PathInternalNetCore { private const string ExtendedDevicePathPrefix = @"\\?\"; private const string UncExtendedPathPrefix = @"\\?\UNC\"; diff --git a/ArchiSteamFarm/RuntimeCompatibility/StaticHelpers.cs b/ArchiSteamFarm/Compatibility/StaticHelpers.cs similarity index 99% rename from ArchiSteamFarm/RuntimeCompatibility/StaticHelpers.cs rename to ArchiSteamFarm/Compatibility/StaticHelpers.cs index 034325da9..d2c0bd69d 100644 --- a/ArchiSteamFarm/RuntimeCompatibility/StaticHelpers.cs +++ b/ArchiSteamFarm/Compatibility/StaticHelpers.cs @@ -34,7 +34,7 @@ using System; using System.Diagnostics; using JetBrains.Annotations; -namespace ArchiSteamFarm.RuntimeCompatibility { +namespace ArchiSteamFarm.Compatibility { [PublicAPI] public static class StaticHelpers { #if NETFRAMEWORK diff --git a/ArchiSteamFarm/Core/ASF.cs b/ArchiSteamFarm/Core/ASF.cs index 96f402ee0..64ea44aeb 100644 --- a/ArchiSteamFarm/Core/ASF.cs +++ b/ArchiSteamFarm/Core/ASF.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; using File = System.IO.File; using Path = System.IO.Path; #endif @@ -212,7 +212,7 @@ namespace ArchiSteamFarm.Core { return false; } - return RuntimeCompatibility.Path.GetRelativePath(".", botName) == botName; + return Compatibility.Path.GetRelativePath(".", botName) == botName; } internal static async Task RestartOrExit() { @@ -951,7 +951,7 @@ namespace ArchiSteamFarm.Core { return false; } - string relativeFilePath = RuntimeCompatibility.Path.GetRelativePath(targetDirectory, file); + string relativeFilePath = Compatibility.Path.GetRelativePath(targetDirectory, file); if (string.IsNullOrEmpty(relativeFilePath)) { ArchiLogger.LogNullError(nameof(relativeFilePath)); @@ -996,7 +996,7 @@ namespace ArchiSteamFarm.Core { Directory.CreateDirectory(targetBackupDirectory); string targetBackupFile = Path.Combine(targetBackupDirectory, fileName); - RuntimeCompatibility.File.Move(file, targetBackupFile, true); + Compatibility.File.Move(file, targetBackupFile, true); } // We can now get rid of directories that are empty @@ -1017,7 +1017,7 @@ namespace ArchiSteamFarm.Core { if (File.Exists(file)) { // This is possible only with files that we decided to leave in place during our backup function string targetBackupFile = file + ".bak"; - RuntimeCompatibility.File.Move(file, targetBackupFile, true); + Compatibility.File.Move(file, targetBackupFile, true); } // Check if this file requires its own folder diff --git a/ArchiSteamFarm/Core/OS.cs b/ArchiSteamFarm/Core/OS.cs index 9300068bd..a76f20ccb 100644 --- a/ArchiSteamFarm/Core/OS.cs +++ b/ArchiSteamFarm/Core/OS.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; using File = System.IO.File; #endif using System; diff --git a/ArchiSteamFarm/Core/Statistics.cs b/ArchiSteamFarm/Core/Statistics.cs index f31781864..e38e76c68 100644 --- a/ArchiSteamFarm/Core/Statistics.cs +++ b/ArchiSteamFarm/Core/Statistics.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; #endif using System; using System.Collections.Generic; diff --git a/ArchiSteamFarm/Helpers/SerializableFile.cs b/ArchiSteamFarm/Helpers/SerializableFile.cs index 281dd42d9..0b813aed3 100644 --- a/ArchiSteamFarm/Helpers/SerializableFile.cs +++ b/ArchiSteamFarm/Helpers/SerializableFile.cs @@ -22,8 +22,8 @@ using System; using System.Threading; using System.Threading.Tasks; +using ArchiSteamFarm.Compatibility; using ArchiSteamFarm.Core; -using ArchiSteamFarm.RuntimeCompatibility; using Newtonsoft.Json; namespace ArchiSteamFarm.Helpers { diff --git a/ArchiSteamFarm/IPC/ArchiKestrel.cs b/ArchiSteamFarm/IPC/ArchiKestrel.cs index ea9dac0dd..5d88f6b88 100644 --- a/ArchiSteamFarm/IPC/ArchiKestrel.cs +++ b/ArchiSteamFarm/IPC/ArchiKestrel.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; using File = System.IO.File; using Path = System.IO.Path; #else @@ -95,7 +95,7 @@ namespace ArchiSteamFarm.IPC { if (customConfigExists) { if (Debugging.IsDebugConfigured) { try { - string json = await RuntimeCompatibility.File.ReadAllTextAsync(customConfigPath).ConfigureAwait(false); + string json = await Compatibility.File.ReadAllTextAsync(customConfigPath).ConfigureAwait(false); if (!string.IsNullOrEmpty(json)) { JObject jObject = JObject.Parse(json); diff --git a/ArchiSteamFarm/IPC/Controllers/Api/ASFController.cs b/ArchiSteamFarm/IPC/Controllers/Api/ASFController.cs index 3129cae78..6a71a0c45 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/ASFController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/ASFController.cs @@ -25,11 +25,11 @@ using System.Globalization; using System.Linq; using System.Net; using System.Threading.Tasks; +using ArchiSteamFarm.Compatibility; 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; diff --git a/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs b/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs index 0dcde6f52..df43061f1 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; #endif using System; using System.Collections.Generic; diff --git a/ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs b/ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs index 264581888..cd70f634f 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; #endif using System; using System.Collections.Concurrent; diff --git a/ArchiSteamFarm/IPC/Startup.cs b/ArchiSteamFarm/IPC/Startup.cs index 52944a4c1..a838921d3 100644 --- a/ArchiSteamFarm/IPC/Startup.cs +++ b/ArchiSteamFarm/IPC/Startup.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; using Newtonsoft.Json.Converters; using File = System.IO.File; using Path = System.IO.Path; diff --git a/ArchiSteamFarm/IPC/WebUtilities.cs b/ArchiSteamFarm/IPC/WebUtilities.cs index 742718bd0..6e9b06f4d 100644 --- a/ArchiSteamFarm/IPC/WebUtilities.cs +++ b/ArchiSteamFarm/IPC/WebUtilities.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; #endif using System; using System.Linq; diff --git a/ArchiSteamFarm/NLog/ArchiLogger.cs b/ArchiSteamFarm/NLog/ArchiLogger.cs index ab05ee52d..30645d6fe 100644 --- a/ArchiSteamFarm/NLog/ArchiLogger.cs +++ b/ArchiSteamFarm/NLog/ArchiLogger.cs @@ -24,9 +24,9 @@ using System.Globalization; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; +using ArchiSteamFarm.Compatibility; using ArchiSteamFarm.Core; using ArchiSteamFarm.Localization; -using ArchiSteamFarm.RuntimeCompatibility; using JetBrains.Annotations; using NLog; using SteamKit2; diff --git a/ArchiSteamFarm/Steam/Bot.cs b/ArchiSteamFarm/Steam/Bot.cs index 4155685ca..dfa1da3e2 100644 --- a/ArchiSteamFarm/Steam/Bot.cs +++ b/ArchiSteamFarm/Steam/Bot.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; using File = System.IO.File; using Path = System.IO.Path; #endif @@ -2035,7 +2035,7 @@ namespace ArchiSteamFarm.Steam { ArchiLogger.LogGenericInfo(Strings.BotAuthenticatorConverting); try { - string json = await RuntimeCompatibility.File.ReadAllTextAsync(maFilePath).ConfigureAwait(false); + string json = await Compatibility.File.ReadAllTextAsync(maFilePath).ConfigureAwait(false); if (string.IsNullOrEmpty(json)) { ArchiLogger.LogGenericError(string.Format(CultureInfo.CurrentCulture, Strings.ErrorIsEmpty, nameof(json))); @@ -2304,7 +2304,7 @@ namespace ArchiSteamFarm.Steam { if (File.Exists(sentryFilePath)) { try { - byte[] sentryFileContent = await RuntimeCompatibility.File.ReadAllBytesAsync(sentryFilePath).ConfigureAwait(false); + byte[] sentryFileContent = await Compatibility.File.ReadAllBytesAsync(sentryFilePath).ConfigureAwait(false); sentryFileHash = CryptoHelper.SHAHash(sentryFileContent); } catch (Exception e) { ArchiLogger.LogGenericException(e); @@ -3335,7 +3335,7 @@ namespace ArchiSteamFarm.Steam { } try { - await RuntimeCompatibility.File.AppendAllTextAsync(filePath, logEntry + Environment.NewLine).ConfigureAwait(false); + await Compatibility.File.AppendAllTextAsync(filePath, logEntry + Environment.NewLine).ConfigureAwait(false); } catch (Exception e) { ArchiLogger.LogGenericException(e); ArchiLogger.LogGenericError(string.Format(CultureInfo.CurrentCulture, Strings.Content, logEntry)); diff --git a/ArchiSteamFarm/Steam/Exchange/Trading.cs b/ArchiSteamFarm/Steam/Exchange/Trading.cs index 0aecd633a..25c11d8e3 100644 --- a/ArchiSteamFarm/Steam/Exchange/Trading.cs +++ b/ArchiSteamFarm/Steam/Exchange/Trading.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; #endif using System; using System.Collections.Generic; diff --git a/ArchiSteamFarm/Steam/Idling/CardsFarmer.cs b/ArchiSteamFarm/Steam/Idling/CardsFarmer.cs index 4339eeaba..138708a37 100644 --- a/ArchiSteamFarm/Steam/Idling/CardsFarmer.cs +++ b/ArchiSteamFarm/Steam/Idling/CardsFarmer.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; #endif using System; using System.Collections.Concurrent; diff --git a/ArchiSteamFarm/Steam/Idling/Game.cs b/ArchiSteamFarm/Steam/Idling/Game.cs index 409d67427..569bdfcb1 100644 --- a/ArchiSteamFarm/Steam/Idling/Game.cs +++ b/ArchiSteamFarm/Steam/Idling/Game.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using HashCode = ArchiSteamFarm.RuntimeCompatibility.HashCode; +using HashCode = ArchiSteamFarm.Compatibility.HashCode; #endif using System; using Newtonsoft.Json; diff --git a/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs b/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs index abc78b7b9..32c8445e7 100644 --- a/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs +++ b/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; #endif using System; using System.Collections.Concurrent; diff --git a/ArchiSteamFarm/Steam/Integration/SteamSaleEvent.cs b/ArchiSteamFarm/Steam/Integration/SteamSaleEvent.cs index cec46ee06..cbab12778 100644 --- a/ArchiSteamFarm/Steam/Integration/SteamSaleEvent.cs +++ b/ArchiSteamFarm/Steam/Integration/SteamSaleEvent.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; #endif using System; using System.Collections.Immutable; diff --git a/ArchiSteamFarm/Steam/Interaction/Actions.cs b/ArchiSteamFarm/Steam/Interaction/Actions.cs index 2b4a4604e..8e2fb34a5 100644 --- a/ArchiSteamFarm/Steam/Interaction/Actions.cs +++ b/ArchiSteamFarm/Steam/Interaction/Actions.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; #endif using System; using System.Collections.Generic; diff --git a/ArchiSteamFarm/Steam/Interaction/Commands.cs b/ArchiSteamFarm/Steam/Interaction/Commands.cs index 1627a40f4..201ff77be 100644 --- a/ArchiSteamFarm/Steam/Interaction/Commands.cs +++ b/ArchiSteamFarm/Steam/Interaction/Commands.cs @@ -27,11 +27,11 @@ using System.Net.Http; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; +using ArchiSteamFarm.Compatibility; 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; diff --git a/ArchiSteamFarm/Steam/SteamKit2/ServerRecordEndPoint.cs b/ArchiSteamFarm/Steam/SteamKit2/ServerRecordEndPoint.cs index 0729208df..948d1f037 100644 --- a/ArchiSteamFarm/Steam/SteamKit2/ServerRecordEndPoint.cs +++ b/ArchiSteamFarm/Steam/SteamKit2/ServerRecordEndPoint.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using HashCode = ArchiSteamFarm.RuntimeCompatibility.HashCode; +using HashCode = ArchiSteamFarm.Compatibility.HashCode; #endif using System; using System.ComponentModel; diff --git a/ArchiSteamFarm/Steam/Storage/BotConfig.cs b/ArchiSteamFarm/Steam/Storage/BotConfig.cs index bf77e74ca..cd4e010ff 100644 --- a/ArchiSteamFarm/Steam/Storage/BotConfig.cs +++ b/ArchiSteamFarm/Steam/Storage/BotConfig.cs @@ -27,10 +27,10 @@ using System.Globalization; using System.Linq; using System.Threading; using System.Threading.Tasks; +using ArchiSteamFarm.Compatibility; using ArchiSteamFarm.Core; using ArchiSteamFarm.Helpers; using ArchiSteamFarm.Localization; -using ArchiSteamFarm.RuntimeCompatibility; using ArchiSteamFarm.Steam.Data; using ArchiSteamFarm.Steam.Integration; using JetBrains.Annotations; diff --git a/ArchiSteamFarm/Steam/Storage/BotDatabase.cs b/ArchiSteamFarm/Steam/Storage/BotDatabase.cs index 85cfebb03..7a5cda4ba 100644 --- a/ArchiSteamFarm/Steam/Storage/BotDatabase.cs +++ b/ArchiSteamFarm/Steam/Storage/BotDatabase.cs @@ -155,7 +155,7 @@ namespace ArchiSteamFarm.Steam.Storage { BotDatabase? botDatabase; try { - string json = await RuntimeCompatibility.File.ReadAllTextAsync(filePath).ConfigureAwait(false); + string json = await Compatibility.File.ReadAllTextAsync(filePath).ConfigureAwait(false); if (string.IsNullOrEmpty(json)) { ASF.ArchiLogger.LogGenericError(string.Format(CultureInfo.CurrentCulture, Strings.ErrorIsEmpty, nameof(json))); diff --git a/ArchiSteamFarm/Storage/GlobalConfig.cs b/ArchiSteamFarm/Storage/GlobalConfig.cs index bedd64cf4..6de5a7cc9 100644 --- a/ArchiSteamFarm/Storage/GlobalConfig.cs +++ b/ArchiSteamFarm/Storage/GlobalConfig.cs @@ -351,7 +351,7 @@ namespace ArchiSteamFarm.Storage { GlobalConfig? globalConfig; try { - string json = await RuntimeCompatibility.File.ReadAllTextAsync(filePath).ConfigureAwait(false); + string json = await Compatibility.File.ReadAllTextAsync(filePath).ConfigureAwait(false); if (string.IsNullOrEmpty(json)) { ASF.ArchiLogger.LogGenericError(string.Format(CultureInfo.CurrentCulture, Strings.ErrorIsEmpty, nameof(json))); @@ -400,7 +400,7 @@ namespace ArchiSteamFarm.Storage { await WriteSemaphore.WaitAsync().ConfigureAwait(false); try { - await RuntimeCompatibility.File.WriteAllTextAsync(newFilePath, json).ConfigureAwait(false); + await Compatibility.File.WriteAllTextAsync(newFilePath, json).ConfigureAwait(false); if (File.Exists(filePath)) { File.Replace(newFilePath, filePath, null); diff --git a/ArchiSteamFarm/Storage/GlobalDatabase.cs b/ArchiSteamFarm/Storage/GlobalDatabase.cs index e312184c9..0e54a8f49 100644 --- a/ArchiSteamFarm/Storage/GlobalDatabase.cs +++ b/ArchiSteamFarm/Storage/GlobalDatabase.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; using File = System.IO.File; #else using System.IO; @@ -138,7 +138,7 @@ namespace ArchiSteamFarm.Storage { GlobalDatabase? globalDatabase; try { - string json = await RuntimeCompatibility.File.ReadAllTextAsync(filePath).ConfigureAwait(false); + string json = await Compatibility.File.ReadAllTextAsync(filePath).ConfigureAwait(false); if (string.IsNullOrEmpty(json)) { ASF.ArchiLogger.LogGenericError(string.Format(CultureInfo.CurrentCulture, Strings.ErrorIsEmpty, nameof(json))); diff --git a/ArchiSteamFarm/Web/Responses/StreamResponse.cs b/ArchiSteamFarm/Web/Responses/StreamResponse.cs index 52e004c7b..7cf03fec0 100644 --- a/ArchiSteamFarm/Web/Responses/StreamResponse.cs +++ b/ArchiSteamFarm/Web/Responses/StreamResponse.cs @@ -20,7 +20,7 @@ // limitations under the License. #if NETFRAMEWORK -using ArchiSteamFarm.RuntimeCompatibility; +using ArchiSteamFarm.Compatibility; #endif using System; using System.IO; diff --git a/ArchiSteamFarm/Web/WebBrowser.cs b/ArchiSteamFarm/Web/WebBrowser.cs index d48e0b0e9..51e247497 100644 --- a/ArchiSteamFarm/Web/WebBrowser.cs +++ b/ArchiSteamFarm/Web/WebBrowser.cs @@ -29,10 +29,10 @@ using System.Net.Http; using System.Text; using System.Threading.Tasks; using System.Xml; +using ArchiSteamFarm.Compatibility; using ArchiSteamFarm.Core; using ArchiSteamFarm.Localization; using ArchiSteamFarm.NLog; -using ArchiSteamFarm.RuntimeCompatibility; using ArchiSteamFarm.Web.Responses; using JetBrains.Annotations; using Newtonsoft.Json;