mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-16 22:40:30 +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) {
|
internal void UpdateAppTokens(IReadOnlyCollection<KeyValuePair<uint, ulong>> appTokens, IReadOnlyCollection<uint> publicAppIDs) {
|
||||||
ArgumentNullException.ThrowIfNull(appTokens);
|
ArgumentNullException.ThrowIfNull(appTokens);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(publicAppIDs);
|
ArgumentNullException.ThrowIfNull(publicAppIDs);
|
||||||
|
|
||||||
bool save = false;
|
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) {
|
internal void UpdateSubmittedData(IReadOnlyDictionary<uint, ulong> apps, IReadOnlyDictionary<uint, ulong> packages, IReadOnlyDictionary<uint, string> depots) {
|
||||||
ArgumentNullException.ThrowIfNull(apps);
|
ArgumentNullException.ThrowIfNull(apps);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(packages);
|
ArgumentNullException.ThrowIfNull(packages);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(depots);
|
ArgumentNullException.ThrowIfNull(depots);
|
||||||
|
|
||||||
foreach ((uint appID, ulong token) in apps) {
|
foreach ((uint appID, ulong token) in apps) {
|
||||||
|
|||||||
@@ -59,9 +59,7 @@ internal sealed class RequestData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(apps);
|
ArgumentNullException.ThrowIfNull(apps);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(accessTokens);
|
ArgumentNullException.ThrowIfNull(accessTokens);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(depots);
|
ArgumentNullException.ThrowIfNull(depots);
|
||||||
|
|
||||||
SteamID = steamID;
|
SteamID = steamID;
|
||||||
|
|||||||
@@ -177,7 +177,6 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
|
|||||||
|
|
||||||
public Task OnBotSteamCallbacksInit(Bot bot, CallbackManager callbackManager) {
|
public Task OnBotSteamCallbacksInit(Bot bot, CallbackManager callbackManager) {
|
||||||
ArgumentNullException.ThrowIfNull(bot);
|
ArgumentNullException.ThrowIfNull(bot);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(callbackManager);
|
ArgumentNullException.ThrowIfNull(callbackManager);
|
||||||
|
|
||||||
if (BotSubscriptions.TryRemove(bot, out IDisposable? subscription)) {
|
if (BotSubscriptions.TryRemove(bot, out IDisposable? subscription)) {
|
||||||
@@ -211,7 +210,6 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
|
|||||||
}
|
}
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(appChanges);
|
ArgumentNullException.ThrowIfNull(appChanges);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(packageChanges);
|
ArgumentNullException.ThrowIfNull(packageChanges);
|
||||||
|
|
||||||
if (Config is not { Enabled: true }) {
|
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) {
|
private static async void OnLicenseList(Bot bot, SteamApps.LicenseListCallback callback) {
|
||||||
ArgumentNullException.ThrowIfNull(bot);
|
ArgumentNullException.ThrowIfNull(bot);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(callback);
|
ArgumentNullException.ThrowIfNull(callback);
|
||||||
|
|
||||||
if (Config is not { Enabled: true }) {
|
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) {
|
private static void AssertResultMatchesExpectation(IReadOnlyDictionary<(uint RealAppID, ulong ContextID, ulong ClassID), uint> expectedResult, IReadOnlyCollection<Asset> itemsToSend) {
|
||||||
ArgumentNullException.ThrowIfNull(expectedResult);
|
ArgumentNullException.ThrowIfNull(expectedResult);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(itemsToSend);
|
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));
|
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) {
|
private static async void OnChanged(object sender, FileSystemEventArgs e) {
|
||||||
ArgumentNullException.ThrowIfNull(sender);
|
ArgumentNullException.ThrowIfNull(sender);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(e);
|
ArgumentNullException.ThrowIfNull(e);
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(e.Name)) {
|
if (string.IsNullOrEmpty(e.Name)) {
|
||||||
@@ -568,7 +567,6 @@ public static class ASF {
|
|||||||
|
|
||||||
private static async void OnCreated(object sender, FileSystemEventArgs e) {
|
private static async void OnCreated(object sender, FileSystemEventArgs e) {
|
||||||
ArgumentNullException.ThrowIfNull(sender);
|
ArgumentNullException.ThrowIfNull(sender);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(e);
|
ArgumentNullException.ThrowIfNull(e);
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(e.Name)) {
|
if (string.IsNullOrEmpty(e.Name)) {
|
||||||
@@ -706,7 +704,6 @@ public static class ASF {
|
|||||||
|
|
||||||
private static async void OnDeleted(object sender, FileSystemEventArgs e) {
|
private static async void OnDeleted(object sender, FileSystemEventArgs e) {
|
||||||
ArgumentNullException.ThrowIfNull(sender);
|
ArgumentNullException.ThrowIfNull(sender);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(e);
|
ArgumentNullException.ThrowIfNull(e);
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(e.Name)) {
|
if (string.IsNullOrEmpty(e.Name)) {
|
||||||
@@ -826,7 +823,6 @@ public static class ASF {
|
|||||||
|
|
||||||
private static async void OnRenamed(object sender, RenamedEventArgs e) {
|
private static async void OnRenamed(object sender, RenamedEventArgs e) {
|
||||||
ArgumentNullException.ThrowIfNull(sender);
|
ArgumentNullException.ThrowIfNull(sender);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(e);
|
ArgumentNullException.ThrowIfNull(e);
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(e.OldName)) {
|
if (string.IsNullOrEmpty(e.OldName)) {
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ internal sealed class ApiAuthenticationMiddleware {
|
|||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
public async Task InvokeAsync(HttpContext context, IOptions<MvcNewtonsoftJsonOptions> jsonOptions) {
|
public async Task InvokeAsync(HttpContext context, IOptions<MvcNewtonsoftJsonOptions> jsonOptions) {
|
||||||
ArgumentNullException.ThrowIfNull(context);
|
ArgumentNullException.ThrowIfNull(context);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(jsonOptions);
|
ArgumentNullException.ThrowIfNull(jsonOptions);
|
||||||
|
|
||||||
(HttpStatusCode statusCode, bool permanent) = await GetAuthenticationStatus(context).ConfigureAwait(false);
|
(HttpStatusCode statusCode, bool permanent) = await GetAuthenticationStatus(context).ConfigureAwait(false);
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ namespace ArchiSteamFarm.IPC.Integration;
|
|||||||
internal sealed class CustomAttributesSchemaFilter : ISchemaFilter {
|
internal sealed class CustomAttributesSchemaFilter : ISchemaFilter {
|
||||||
public void Apply(OpenApiSchema schema, SchemaFilterContext context) {
|
public void Apply(OpenApiSchema schema, SchemaFilterContext context) {
|
||||||
ArgumentNullException.ThrowIfNull(schema);
|
ArgumentNullException.ThrowIfNull(schema);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(context);
|
ArgumentNullException.ThrowIfNull(context);
|
||||||
|
|
||||||
ICustomAttributeProvider attributesProvider;
|
ICustomAttributeProvider attributesProvider;
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ namespace ArchiSteamFarm.IPC.Integration;
|
|||||||
internal sealed class EnumSchemaFilter : ISchemaFilter {
|
internal sealed class EnumSchemaFilter : ISchemaFilter {
|
||||||
public void Apply(OpenApiSchema schema, SchemaFilterContext context) {
|
public void Apply(OpenApiSchema schema, SchemaFilterContext context) {
|
||||||
ArgumentNullException.ThrowIfNull(schema);
|
ArgumentNullException.ThrowIfNull(schema);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(context);
|
ArgumentNullException.ThrowIfNull(context);
|
||||||
|
|
||||||
if (context.Type is not { IsEnum: true }) {
|
if (context.Type is not { IsEnum: true }) {
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ internal sealed class Startup {
|
|||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) {
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) {
|
||||||
ArgumentNullException.ThrowIfNull(app);
|
ArgumentNullException.ThrowIfNull(app);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(env);
|
ArgumentNullException.ThrowIfNull(env);
|
||||||
|
|
||||||
// The order of dependency injection is super important, doing things in wrong order will break everything
|
// 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) {
|
internal static async Task OnBotSteamCallbacksInit(Bot bot, CallbackManager callbackManager) {
|
||||||
ArgumentNullException.ThrowIfNull(bot);
|
ArgumentNullException.ThrowIfNull(bot);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(callbackManager);
|
ArgumentNullException.ThrowIfNull(callbackManager);
|
||||||
|
|
||||||
if ((ActivePlugins == null) || (ActivePlugins.Count == 0)) {
|
if ((ActivePlugins == null) || (ActivePlugins.Count == 0)) {
|
||||||
@@ -500,7 +499,6 @@ internal static class PluginsCore {
|
|||||||
|
|
||||||
internal static async Task<bool> OnBotTradeOffer(Bot bot, TradeOffer tradeOffer) {
|
internal static async Task<bool> OnBotTradeOffer(Bot bot, TradeOffer tradeOffer) {
|
||||||
ArgumentNullException.ThrowIfNull(bot);
|
ArgumentNullException.ThrowIfNull(bot);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(tradeOffer);
|
ArgumentNullException.ThrowIfNull(tradeOffer);
|
||||||
|
|
||||||
if ((ActivePlugins == null) || (ActivePlugins.Count == 0)) {
|
if ((ActivePlugins == null) || (ActivePlugins.Count == 0)) {
|
||||||
@@ -562,7 +560,6 @@ internal static class PluginsCore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(appChanges);
|
ArgumentNullException.ThrowIfNull(appChanges);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(packageChanges);
|
ArgumentNullException.ThrowIfNull(packageChanges);
|
||||||
|
|
||||||
if ((ActivePlugins == null) || (ActivePlugins.Count == 0)) {
|
if ((ActivePlugins == null) || (ActivePlugins.Count == 0)) {
|
||||||
|
|||||||
@@ -395,7 +395,6 @@ public sealed class CardsFarmer : IAsyncDisposable {
|
|||||||
|
|
||||||
private async Task CheckPage(IDocument htmlDocument, ISet<uint> parsedAppIDs) {
|
private async Task CheckPage(IDocument htmlDocument, ISet<uint> parsedAppIDs) {
|
||||||
ArgumentNullException.ThrowIfNull(htmlDocument);
|
ArgumentNullException.ThrowIfNull(htmlDocument);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(parsedAppIDs);
|
ArgumentNullException.ThrowIfNull(parsedAppIDs);
|
||||||
|
|
||||||
IEnumerable<IElement> htmlNodes = htmlDocument.SelectNodes("//div[@class='badge_row_inner']");
|
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) {
|
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(fullState);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(tradableState);
|
ArgumentNullException.ThrowIfNull(tradableState);
|
||||||
|
|
||||||
foreach (((uint RealAppID, Asset.EType Type, Asset.ERarity Rarity) set, IReadOnlyDictionary<ulong, uint> state) in 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) {
|
internal static bool IsEmptyForMatching(IReadOnlyDictionary<ulong, uint> fullSet, IReadOnlyDictionary<ulong, uint> tradableSet) {
|
||||||
ArgumentNullException.ThrowIfNull(fullSet);
|
ArgumentNullException.ThrowIfNull(fullSet);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(tradableSet);
|
ArgumentNullException.ThrowIfNull(tradableSet);
|
||||||
|
|
||||||
foreach ((ulong classID, uint amount) in tradableSet) {
|
foreach ((ulong classID, uint amount) in tradableSet) {
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
|
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
|
||||||
<PackageReference Include="JustArchiNET.Madness" />
|
<PackageReference Include="JustArchiNET.Madness" />
|
||||||
<Using 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.ConvertMadness.Convert" Alias="Convert" />
|
||||||
<Using Include="JustArchiNET.Madness.EnvironmentMadness.Environment" Alias="Environment" />
|
<Using Include="JustArchiNET.Madness.EnvironmentMadness.Environment" Alias="Environment" />
|
||||||
<Using Include="JustArchiNET.Madness.FileMadness.File" Alias="File" />
|
<Using Include="JustArchiNET.Madness.FileMadness.File" Alias="File" />
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
|
<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.Cors" Version="2.2.0" />
|
||||||
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics" Version="2.2.0" />
|
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics" Version="2.2.0" />
|
||||||
<PackageVersion Include="Microsoft.AspNetCore.HttpOverrides" Version="2.2.0" />
|
<PackageVersion Include="Microsoft.AspNetCore.HttpOverrides" Version="2.2.0" />
|
||||||
|
|||||||
Reference in New Issue
Block a user