diff --git a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs index 48b2ced9e..e7a348daa 100644 --- a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs +++ b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs @@ -199,7 +199,6 @@ internal sealed class GlobalCache : SerializableFile { internal void UpdateAppTokens(IReadOnlyCollection> appTokens, IReadOnlyCollection publicAppIDs) { ArgumentNullException.ThrowIfNull(appTokens); - ArgumentNullException.ThrowIfNull(publicAppIDs); bool save = false; @@ -279,9 +278,7 @@ internal sealed class GlobalCache : SerializableFile { internal void UpdateSubmittedData(IReadOnlyDictionary apps, IReadOnlyDictionary packages, IReadOnlyDictionary depots) { ArgumentNullException.ThrowIfNull(apps); - ArgumentNullException.ThrowIfNull(packages); - ArgumentNullException.ThrowIfNull(depots); foreach ((uint appID, ulong token) in apps) { diff --git a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/RequestData.cs b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/RequestData.cs index ea3b5579e..94bfd63ee 100644 --- a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/RequestData.cs +++ b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/RequestData.cs @@ -59,9 +59,7 @@ internal sealed class RequestData { } ArgumentNullException.ThrowIfNull(apps); - ArgumentNullException.ThrowIfNull(accessTokens); - ArgumentNullException.ThrowIfNull(depots); SteamID = steamID; diff --git a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs index 8093dc018..5009fdf13 100644 --- a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs +++ b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs @@ -177,7 +177,6 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS public Task OnBotSteamCallbacksInit(Bot bot, CallbackManager callbackManager) { ArgumentNullException.ThrowIfNull(bot); - ArgumentNullException.ThrowIfNull(callbackManager); if (BotSubscriptions.TryRemove(bot, out IDisposable? subscription)) { @@ -211,7 +210,6 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS } ArgumentNullException.ThrowIfNull(appChanges); - ArgumentNullException.ThrowIfNull(packageChanges); if (Config is not { Enabled: true }) { @@ -255,7 +253,6 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS private static async void OnLicenseList(Bot bot, SteamApps.LicenseListCallback callback) { ArgumentNullException.ThrowIfNull(bot); - ArgumentNullException.ThrowIfNull(callback); if (Config is not { Enabled: true }) { diff --git a/ArchiSteamFarm.Tests/Bot.cs b/ArchiSteamFarm.Tests/Bot.cs index e30c10686..77c329711 100644 --- a/ArchiSteamFarm.Tests/Bot.cs +++ b/ArchiSteamFarm.Tests/Bot.cs @@ -486,7 +486,6 @@ public sealed class Bot { private static void AssertResultMatchesExpectation(IReadOnlyDictionary<(uint RealAppID, ulong ContextID, ulong ClassID), uint> expectedResult, IReadOnlyCollection itemsToSend) { ArgumentNullException.ThrowIfNull(expectedResult); - ArgumentNullException.ThrowIfNull(itemsToSend); Dictionary<(uint RealAppID, ulong ContextID, ulong ClassID), long> realResult = itemsToSend.GroupBy(static asset => (asset.RealAppID, asset.ContextID, asset.ClassID)).ToDictionary(static group => group.Key, static group => group.Sum(static asset => asset.Amount)); diff --git a/ArchiSteamFarm/Core/ASF.cs b/ArchiSteamFarm/Core/ASF.cs index 1f365980b..7ff65b2f0 100644 --- a/ArchiSteamFarm/Core/ASF.cs +++ b/ArchiSteamFarm/Core/ASF.cs @@ -486,7 +486,6 @@ public static class ASF { private static async void OnChanged(object sender, FileSystemEventArgs e) { ArgumentNullException.ThrowIfNull(sender); - ArgumentNullException.ThrowIfNull(e); if (string.IsNullOrEmpty(e.Name)) { @@ -568,7 +567,6 @@ public static class ASF { private static async void OnCreated(object sender, FileSystemEventArgs e) { ArgumentNullException.ThrowIfNull(sender); - ArgumentNullException.ThrowIfNull(e); if (string.IsNullOrEmpty(e.Name)) { @@ -706,7 +704,6 @@ public static class ASF { private static async void OnDeleted(object sender, FileSystemEventArgs e) { ArgumentNullException.ThrowIfNull(sender); - ArgumentNullException.ThrowIfNull(e); if (string.IsNullOrEmpty(e.Name)) { @@ -826,7 +823,6 @@ public static class ASF { private static async void OnRenamed(object sender, RenamedEventArgs e) { ArgumentNullException.ThrowIfNull(sender); - ArgumentNullException.ThrowIfNull(e); if (string.IsNullOrEmpty(e.OldName)) { diff --git a/ArchiSteamFarm/IPC/Integration/ApiAuthenticationMiddleware.cs b/ArchiSteamFarm/IPC/Integration/ApiAuthenticationMiddleware.cs index 4c6bd5248..118165423 100644 --- a/ArchiSteamFarm/IPC/Integration/ApiAuthenticationMiddleware.cs +++ b/ArchiSteamFarm/IPC/Integration/ApiAuthenticationMiddleware.cs @@ -71,7 +71,6 @@ internal sealed class ApiAuthenticationMiddleware { [UsedImplicitly] public async Task InvokeAsync(HttpContext context, IOptions jsonOptions) { ArgumentNullException.ThrowIfNull(context); - ArgumentNullException.ThrowIfNull(jsonOptions); (HttpStatusCode statusCode, bool permanent) = await GetAuthenticationStatus(context).ConfigureAwait(false); diff --git a/ArchiSteamFarm/IPC/Integration/CustomAttributesSchemaFilter.cs b/ArchiSteamFarm/IPC/Integration/CustomAttributesSchemaFilter.cs index a6aa8a938..134aa1d61 100644 --- a/ArchiSteamFarm/IPC/Integration/CustomAttributesSchemaFilter.cs +++ b/ArchiSteamFarm/IPC/Integration/CustomAttributesSchemaFilter.cs @@ -31,7 +31,6 @@ namespace ArchiSteamFarm.IPC.Integration; internal sealed class CustomAttributesSchemaFilter : ISchemaFilter { public void Apply(OpenApiSchema schema, SchemaFilterContext context) { ArgumentNullException.ThrowIfNull(schema); - ArgumentNullException.ThrowIfNull(context); ICustomAttributeProvider attributesProvider; diff --git a/ArchiSteamFarm/IPC/Integration/EnumSchemaFilter.cs b/ArchiSteamFarm/IPC/Integration/EnumSchemaFilter.cs index 0ac00ffb1..125c10b40 100644 --- a/ArchiSteamFarm/IPC/Integration/EnumSchemaFilter.cs +++ b/ArchiSteamFarm/IPC/Integration/EnumSchemaFilter.cs @@ -33,7 +33,6 @@ namespace ArchiSteamFarm.IPC.Integration; internal sealed class EnumSchemaFilter : ISchemaFilter { public void Apply(OpenApiSchema schema, SchemaFilterContext context) { ArgumentNullException.ThrowIfNull(schema); - ArgumentNullException.ThrowIfNull(context); if (context.Type is not { IsEnum: true }) { diff --git a/ArchiSteamFarm/IPC/Startup.cs b/ArchiSteamFarm/IPC/Startup.cs index 03306ad8e..283c3ca7f 100644 --- a/ArchiSteamFarm/IPC/Startup.cs +++ b/ArchiSteamFarm/IPC/Startup.cs @@ -63,7 +63,6 @@ internal sealed class Startup { [UsedImplicitly] public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { ArgumentNullException.ThrowIfNull(app); - ArgumentNullException.ThrowIfNull(env); // The order of dependency injection is super important, doing things in wrong order will break everything diff --git a/ArchiSteamFarm/Plugins/PluginsCore.cs b/ArchiSteamFarm/Plugins/PluginsCore.cs index 141ade303..9a7676e53 100644 --- a/ArchiSteamFarm/Plugins/PluginsCore.cs +++ b/ArchiSteamFarm/Plugins/PluginsCore.cs @@ -464,7 +464,6 @@ internal static class PluginsCore { internal static async Task OnBotSteamCallbacksInit(Bot bot, CallbackManager callbackManager) { ArgumentNullException.ThrowIfNull(bot); - ArgumentNullException.ThrowIfNull(callbackManager); if ((ActivePlugins == null) || (ActivePlugins.Count == 0)) { @@ -500,7 +499,6 @@ internal static class PluginsCore { internal static async Task OnBotTradeOffer(Bot bot, TradeOffer tradeOffer) { ArgumentNullException.ThrowIfNull(bot); - ArgumentNullException.ThrowIfNull(tradeOffer); if ((ActivePlugins == null) || (ActivePlugins.Count == 0)) { @@ -562,7 +560,6 @@ internal static class PluginsCore { } ArgumentNullException.ThrowIfNull(appChanges); - ArgumentNullException.ThrowIfNull(packageChanges); if ((ActivePlugins == null) || (ActivePlugins.Count == 0)) { diff --git a/ArchiSteamFarm/Steam/Cards/CardsFarmer.cs b/ArchiSteamFarm/Steam/Cards/CardsFarmer.cs index 36805f7b2..a2c76a8e3 100644 --- a/ArchiSteamFarm/Steam/Cards/CardsFarmer.cs +++ b/ArchiSteamFarm/Steam/Cards/CardsFarmer.cs @@ -395,7 +395,6 @@ public sealed class CardsFarmer : IAsyncDisposable { private async Task CheckPage(IDocument htmlDocument, ISet parsedAppIDs) { ArgumentNullException.ThrowIfNull(htmlDocument); - ArgumentNullException.ThrowIfNull(parsedAppIDs); IEnumerable htmlNodes = htmlDocument.SelectNodes("//div[@class='badge_row_inner']"); diff --git a/ArchiSteamFarm/Steam/Exchange/Trading.cs b/ArchiSteamFarm/Steam/Exchange/Trading.cs index 354de4a0d..5551bad63 100644 --- a/ArchiSteamFarm/Steam/Exchange/Trading.cs +++ b/ArchiSteamFarm/Steam/Exchange/Trading.cs @@ -293,7 +293,6 @@ public sealed class Trading : IDisposable { internal static bool IsEmptyForMatching(IReadOnlyDictionary<(uint RealAppID, Asset.EType Type, Asset.ERarity Rarity), Dictionary> fullState, IReadOnlyDictionary<(uint RealAppID, Asset.EType Type, Asset.ERarity Rarity), Dictionary> tradableState) { ArgumentNullException.ThrowIfNull(fullState); - ArgumentNullException.ThrowIfNull(tradableState); foreach (((uint RealAppID, Asset.EType Type, Asset.ERarity Rarity) set, IReadOnlyDictionary state) in tradableState) { @@ -312,7 +311,6 @@ public sealed class Trading : IDisposable { internal static bool IsEmptyForMatching(IReadOnlyDictionary fullSet, IReadOnlyDictionary tradableSet) { ArgumentNullException.ThrowIfNull(fullSet); - ArgumentNullException.ThrowIfNull(tradableSet); foreach ((ulong classID, uint amount) in tradableSet) { diff --git a/Directory.Build.props b/Directory.Build.props index 631c6691a..f2628c952 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -33,6 +33,7 @@ + diff --git a/Directory.Packages.props b/Directory.Packages.props index b7263947b..ae450b737 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -27,7 +27,7 @@ - +