mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-16 14:30:31 +00:00
Try to fix netf, once again into the breach
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -59,9 +59,7 @@ internal sealed class RequestData {
|
||||
}
|
||||
|
||||
ArgumentNullException.ThrowIfNull(apps);
|
||||
|
||||
ArgumentNullException.ThrowIfNull(accessTokens);
|
||||
|
||||
ArgumentNullException.ThrowIfNull(depots);
|
||||
|
||||
SteamID = steamID;
|
||||
|
||||
@@ -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 }) {
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 }) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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']");
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user