Try to fix netf, once again into the breach

This commit is contained in:
Archi
2021-12-12 01:44:17 +01:00
parent 4f598d5c8f
commit 225003c5d1
14 changed files with 2 additions and 24 deletions

View File

@@ -199,7 +199,6 @@ internal sealed class GlobalCache : SerializableFile {
internal void UpdateAppTokens(IReadOnlyCollection<KeyValuePair<uint, ulong>> appTokens, IReadOnlyCollection<uint> publicAppIDs) {
ArgumentNullException.ThrowIfNull(appTokens);
ArgumentNullException.ThrowIfNull(publicAppIDs);
bool save = false;
@@ -279,9 +278,7 @@ internal sealed class GlobalCache : SerializableFile {
internal void UpdateSubmittedData(IReadOnlyDictionary<uint, ulong> apps, IReadOnlyDictionary<uint, ulong> packages, IReadOnlyDictionary<uint, string> depots) {
ArgumentNullException.ThrowIfNull(apps);
ArgumentNullException.ThrowIfNull(packages);
ArgumentNullException.ThrowIfNull(depots);
foreach ((uint appID, ulong token) in apps) {

View File

@@ -59,9 +59,7 @@ internal sealed class RequestData {
}
ArgumentNullException.ThrowIfNull(apps);
ArgumentNullException.ThrowIfNull(accessTokens);
ArgumentNullException.ThrowIfNull(depots);
SteamID = steamID;

View File

@@ -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 }) {

View File

@@ -486,7 +486,6 @@ public sealed class Bot {
private static void AssertResultMatchesExpectation(IReadOnlyDictionary<(uint RealAppID, ulong ContextID, ulong ClassID), uint> expectedResult, IReadOnlyCollection<Asset> 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));

View File

@@ -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)) {

View File

@@ -71,7 +71,6 @@ internal sealed class ApiAuthenticationMiddleware {
[UsedImplicitly]
public async Task InvokeAsync(HttpContext context, IOptions<MvcNewtonsoftJsonOptions> jsonOptions) {
ArgumentNullException.ThrowIfNull(context);
ArgumentNullException.ThrowIfNull(jsonOptions);
(HttpStatusCode statusCode, bool permanent) = await GetAuthenticationStatus(context).ConfigureAwait(false);

View File

@@ -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;

View File

@@ -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 }) {

View File

@@ -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

View File

@@ -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<bool> 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)) {

View File

@@ -395,7 +395,6 @@ public sealed class CardsFarmer : IAsyncDisposable {
private async Task CheckPage(IDocument htmlDocument, ISet<uint> parsedAppIDs) {
ArgumentNullException.ThrowIfNull(htmlDocument);
ArgumentNullException.ThrowIfNull(parsedAppIDs);
IEnumerable<IElement> htmlNodes = htmlDocument.SelectNodes("//div[@class='badge_row_inner']");

View File

@@ -293,7 +293,6 @@ public sealed class Trading : IDisposable {
internal static bool IsEmptyForMatching(IReadOnlyDictionary<(uint RealAppID, Asset.EType Type, Asset.ERarity Rarity), Dictionary<ulong, uint>> fullState, IReadOnlyDictionary<(uint RealAppID, Asset.EType Type, Asset.ERarity Rarity), Dictionary<ulong, uint>> tradableState) {
ArgumentNullException.ThrowIfNull(fullState);
ArgumentNullException.ThrowIfNull(tradableState);
foreach (((uint RealAppID, Asset.EType Type, Asset.ERarity Rarity) set, IReadOnlyDictionary<ulong, uint> state) in tradableState) {
@@ -312,7 +311,6 @@ public sealed class Trading : IDisposable {
internal static bool IsEmptyForMatching(IReadOnlyDictionary<ulong, uint> fullSet, IReadOnlyDictionary<ulong, uint> tradableSet) {
ArgumentNullException.ThrowIfNull(fullSet);
ArgumentNullException.ThrowIfNull(tradableSet);
foreach ((ulong classID, uint amount) in tradableSet) {

View File

@@ -33,6 +33,7 @@
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
<PackageReference Include="JustArchiNET.Madness" />
<Using Include="JustArchiNET.Madness" />
<Using Include="JustArchiNET.Madness.ArgumentNullExceptionMadness.ArgumentNullException" Alias="ArgumentNullException" />
<Using Include="JustArchiNET.Madness.ConvertMadness.Convert" Alias="Convert" />
<Using Include="JustArchiNET.Madness.EnvironmentMadness.Environment" Alias="Environment" />
<Using Include="JustArchiNET.Madness.FileMadness.File" Alias="File" />

View File

@@ -27,7 +27,7 @@
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
<PackageVersion Include="JustArchiNET.Madness" Version="3.0.0" />
<PackageVersion Include="JustArchiNET.Madness" Version="3.1.0" />
<PackageVersion Include="Microsoft.AspNetCore.Cors" Version="2.2.0" />
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics" Version="2.2.0" />
<PackageVersion Include="Microsoft.AspNetCore.HttpOverrides" Version="2.2.0" />