Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 95 additions & 33 deletions ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@

namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper;

internal sealed class GlobalCache : SerializableFile {
internal sealed class GlobalCache : SerializableFile, IDisposable {
private readonly object _saveLock = new();
private bool _disposed;

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

Unused field '_disposed' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1823)

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

The field 'GlobalCache._disposed' is never used

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

Unused field '_disposed' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1823)

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

The field 'GlobalCache._disposed' is never used

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

Unused field '_disposed' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1823)

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

The field 'GlobalCache._disposed' is never used

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

Unused field '_disposed' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1823)

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

The field 'GlobalCache._disposed' is never used

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

Unused field '_disposed' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1823)

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

The field 'GlobalCache._disposed' is never used

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

Unused field '_disposed' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1823)

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

The field 'GlobalCache._disposed' is never used

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

Unused field '_disposed' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1823)

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

The field 'GlobalCache._disposed' is never used

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

Unused field '_disposed' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1823)

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

The field 'GlobalCache._disposed' is never used

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

Unused field '_disposed' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1823)

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

The field 'GlobalCache._disposed' is never used

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

Unused field '_disposed' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1823)

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

The field 'GlobalCache._disposed' is never used

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

Unused field '_disposed' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1823)

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

The field 'GlobalCache._disposed' is never used

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

Unused field '_disposed' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1823)

Check warning on line 45 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

The field 'GlobalCache._disposed' is never used
internal static readonly ArchiCacheable<FrozenSet<uint>> KnownDepotIDs = new(ResolveKnownDepotIDs, TimeSpan.FromDays(7));

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-latest)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-latest)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-24.04-arm)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, generic)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-latest)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm64)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-15-intel)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-x64)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-11-arm)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-x64)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-x64)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-arm64)

The name 'ResolveKnownDepotIDs' does not exist in the current context

Check failure on line 46 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-arm64)

The name 'ResolveKnownDepotIDs' does not exist in the current context
private bool _isDisposed;

private static string SharedFilePath => Path.Combine(ArchiSteamFarm.SharedInfo.ConfigDirectory, $"{nameof(SteamTokenDumper)}.cache");

Expand Down Expand Up @@ -96,9 +99,48 @@
[UsedImplicitly]
public bool ShouldSerializeSubmittedPackages() => !SubmittedPackages.IsEmpty;

protected override Task Save() => Save(this);

internal ulong GetAppToken(uint appID) => AppTokens[appID];
protected override Task Save()
{
ThrowIfDisposed();

lock (_saveLock)
{
return Save(this);
}
}

public void Dispose()

Check failure on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-latest)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check warning on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check warning on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check failure on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-latest)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check warning on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check warning on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check failure on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-24.04-arm)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check warning on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check warning on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check failure on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, generic)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check warning on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check warning on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check failure on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-latest)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check failure on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm64)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check warning on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check warning on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check failure on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-15-intel)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check failure on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-x64)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check failure on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-11-arm)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check warning on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check warning on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check failure on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check failure on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-x64)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check failure on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-x64)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check failure on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-arm64)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.

Check failure on line 112 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-arm64)

'GlobalCache.Dispose()' hides inherited member 'SerializableFile.Dispose()'. Use the new keyword if hiding was intended.
{
if (_isDisposed)
{
return;
}

// Clear collections to free memory
AppChangeNumbers.Clear();
AppTokens.Clear();
DepotKeys.Clear();
SubmittedApps.Clear();
SubmittedDepots.Clear();
SubmittedPackages.Clear();

_isDisposed = true;
GC.SuppressFinalize(this);
}

private void ThrowIfDisposed()
{
if (_isDisposed)

Check warning on line 133 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

Use 'ObjectDisposedException.ThrowIf' instead of explicitly throwing a new exception instance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1513)

Check warning on line 133 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

Use 'ObjectDisposedException.ThrowIf' instead of explicitly throwing a new exception instance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1513)

Check warning on line 133 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

Use 'ObjectDisposedException.ThrowIf' instead of explicitly throwing a new exception instance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1513)

Check warning on line 133 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

Use 'ObjectDisposedException.ThrowIf' instead of explicitly throwing a new exception instance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1513)

Check warning on line 133 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

Use 'ObjectDisposedException.ThrowIf' instead of explicitly throwing a new exception instance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1513)

Check warning on line 133 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

Use 'ObjectDisposedException.ThrowIf' instead of explicitly throwing a new exception instance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1513)

Check warning on line 133 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

Use 'ObjectDisposedException.ThrowIf' instead of explicitly throwing a new exception instance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1513)

Check warning on line 133 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

Use 'ObjectDisposedException.ThrowIf' instead of explicitly throwing a new exception instance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1513)

Check warning on line 133 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

Use 'ObjectDisposedException.ThrowIf' instead of explicitly throwing a new exception instance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1513)

Check warning on line 133 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

Use 'ObjectDisposedException.ThrowIf' instead of explicitly throwing a new exception instance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1513)

Check warning on line 133 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

Use 'ObjectDisposedException.ThrowIf' instead of explicitly throwing a new exception instance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1513)

Check warning on line 133 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

Use 'ObjectDisposedException.ThrowIf' instead of explicitly throwing a new exception instance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1513)
{
throw new ObjectDisposedException(GetType().FullName);
}
}

internal ulong GetAppToken(uint appID)
{
ThrowIfDisposed();
return AppTokens.TryGetValue(appID, out ulong token) ? token : throw new KeyNotFoundException($"App ID {appID} not found in the cache.");
}

internal Dictionary<uint, ulong> GetAppTokensForSubmission() => AppTokens.Where(appToken => (SteamTokenDumperPlugin.Config?.SecretAppIDs.Contains(appToken.Key) != true) && (appToken.Value > 0) && (!SubmittedApps.TryGetValue(appToken.Key, out ulong token) || (appToken.Value != token))).ToDictionary(static appToken => appToken.Key, static appToken => appToken.Value);
internal Dictionary<uint, string> GetDepotKeysForSubmission() => DepotKeys.Where(depotKey => (SteamTokenDumperPlugin.Config?.SecretDepotIDs.Contains(depotKey.Key) != true) && !string.IsNullOrEmpty(depotKey.Value) && (!SubmittedDepots.TryGetValue(depotKey.Key, out string? key) || (depotKey.Value != key))).ToDictionary(static depotKey => depotKey.Key, static depotKey => depotKey.Value);
Expand All @@ -111,7 +153,12 @@
return ASF.GlobalDatabase.PackageAccessTokensReadOnly.Where(packageToken => (SteamTokenDumperPlugin.Config?.SecretPackageIDs.Contains(packageToken.Key) != true) && (packageToken.Value > 0) && (!SubmittedPackages.TryGetValue(packageToken.Key, out ulong token) || (packageToken.Value != token))).ToDictionary(static packageToken => packageToken.Key, static packageToken => packageToken.Value);
}

internal static async Task<GlobalCache?> Load() {
internal static async Task<GlobalCache?> Load()
{
if (string.IsNullOrEmpty(SharedFilePath))
{
throw new InvalidOperationException("Shared file path is not set.");
}
if (!File.Exists(SharedFilePath)) {
return new GlobalCache();
}
Expand Down Expand Up @@ -144,7 +191,7 @@

ASF.ArchiLogger.LogGenericInfo(Strings.ValidatingGlobalCacheIntegrity);

if (globalCache.DepotKeys.Values.Any(static depotKey => !IsValidDepotKey(depotKey))) {

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-latest)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-latest)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-24.04-arm)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, generic)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-latest)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm64)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-15-intel)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-x64)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-11-arm)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-x64)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-x64)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-arm64)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 194 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-arm64)

The name 'IsValidDepotKey' does not exist in the current context
ASF.ArchiLogger.LogGenericError(Strings.GlobalCacheIntegrityValidationFailed);

return null;
Expand All @@ -153,7 +200,11 @@
return globalCache;
}

internal void OnPICSChanges(uint currentChangeNumber, IReadOnlyCollection<KeyValuePair<uint, SteamApps.PICSChangesCallback.PICSChangeData>> appChanges) {
internal void OnPICSChanges(uint currentChangeNumber, IReadOnlyCollection<KeyValuePair<uint, SteamApps.PICSChangesCallback.PICSChangeData>> appChanges)
{
ThrowIfDisposed();
ArgumentOutOfRangeException.ThrowIfZero(currentChangeNumber);
ArgumentNullException.ThrowIfNull(appChanges);
ArgumentOutOfRangeException.ThrowIfZero(currentChangeNumber);
ArgumentNullException.ThrowIfNull(appChanges);

Expand All @@ -174,7 +225,10 @@
Utilities.InBackground(Save);
}

internal void OnPICSChangesRestart(uint currentChangeNumber) {
internal void OnPICSChangesRestart(uint currentChangeNumber)
{
ThrowIfDisposed();
ArgumentOutOfRangeException.ThrowIfZero(currentChangeNumber);
ArgumentOutOfRangeException.ThrowIfZero(currentChangeNumber);

if (currentChangeNumber <= LastChangeNumber) {
Expand All @@ -186,7 +240,9 @@
Reset();
}

internal void Reset(bool clear = false) {
internal void Reset(bool clear = false)
{
ThrowIfDisposed();
AppChangeNumbers.Clear();

if (clear) {
Expand All @@ -197,10 +253,22 @@
Utilities.InBackground(Save);
}

internal bool ShouldRefreshAppInfo(uint appID) => !AppChangeNumbers.ContainsKey(appID);
internal bool ShouldRefreshDepotKey(uint depotID) => !DepotKeys.ContainsKey(depotID);

internal void UpdateAppChangeNumbers(IReadOnlyCollection<KeyValuePair<uint, uint>> appChangeNumbers) {
internal bool ShouldRefreshAppInfo(uint appID)
{
ThrowIfDisposed();
return !AppChangeNumbers.ContainsKey(appID);
}

internal bool ShouldRefreshDepotKey(uint depotID)
{
ThrowIfDisposed();
return !DepotKeys.ContainsKey(depotID);
}

internal void UpdateAppChangeNumbers(IReadOnlyCollection<KeyValuePair<uint, uint>> appChangeNumbers)
{
ThrowIfDisposed();
ArgumentNullException.ThrowIfNull(appChangeNumbers);
ArgumentNullException.ThrowIfNull(appChangeNumbers);

bool save = false;
Expand All @@ -219,7 +287,11 @@
}
}

internal void UpdateAppTokens(IReadOnlyCollection<KeyValuePair<uint, ulong>> appTokens, IReadOnlyCollection<uint> publicAppIDs) {
internal void UpdateAppTokens(IReadOnlyCollection<KeyValuePair<uint, ulong>> appTokens, IReadOnlyCollection<uint> publicAppIDs)
{
ThrowIfDisposed();
ArgumentNullException.ThrowIfNull(appTokens);
ArgumentNullException.ThrowIfNull(publicAppIDs);
ArgumentNullException.ThrowIfNull(appTokens);
ArgumentNullException.ThrowIfNull(publicAppIDs);

Expand Down Expand Up @@ -248,7 +320,10 @@
}
}

internal void UpdateDepotKey(SteamApps.DepotKeyCallback depotKeyResult) {
internal void UpdateDepotKey(SteamApps.DepotKeyCallback depotKeyResult)
{
ThrowIfDisposed();
ArgumentNullException.ThrowIfNull(depotKeyResult);
ArgumentNullException.ThrowIfNull(depotKeyResult);

if (depotKeyResult.Result != EResult.OK) {
Expand All @@ -257,7 +332,7 @@

string depotKey = Convert.ToHexString(depotKeyResult.DepotKey);

if (!IsValidDepotKey(depotKey)) {

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-latest)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-latest)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-24.04-arm)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, generic)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-latest)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm64)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-15-intel)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-x64)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-11-arm)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-x64)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-x64)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-arm64)

The name 'IsValidDepotKey' does not exist in the current context

Check failure on line 335 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-arm64)

The name 'IsValidDepotKey' does not exist in the current context
ASF.ArchiLogger.LogGenericWarning(ArchiSteamFarm.Localization.Strings.FormatErrorIsInvalid(nameof(depotKey)));

return;
Expand All @@ -272,12 +347,17 @@
Utilities.InBackground(Save);
}

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)
{
ThrowIfDisposed();
ArgumentNullException.ThrowIfNull(apps);
ArgumentNullException.ThrowIfNull(packages);
ArgumentNullException.ThrowIfNull(depots);
ArgumentNullException.ThrowIfNull(apps);
ArgumentNullException.ThrowIfNull(packages);
ArgumentNullException.ThrowIfNull(depots);

bool save = false;

Check warning on line 360 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

The variable 'save' is assigned but its value is never used

Check warning on line 360 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

The variable 'save' is assigned but its value is never used

Check warning on line 360 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

The variable 'save' is assigned but its value is never used

Check warning on line 360 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

The variable 'save' is assigned but its value is never used

Check warning on line 360 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

The variable 'save' is assigned but its value is never used

Check warning on line 360 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

The variable 'save' is assigned but its value is never used

Check warning on line 360 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

The variable 'save' is assigned but its value is never used

Check warning on line 360 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

The variable 'save' is assigned but its value is never used

Check warning on line 360 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

The variable 'save' is assigned but its value is never used

Check warning on line 360 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

The variable 'save' is assigned but its value is never used

Check warning on line 360 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

The variable 'save' is assigned but its value is never used

Check warning on line 360 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

The variable 'save' is assigned but its value is never used

foreach ((uint appID, ulong token) in apps) {
if (SubmittedApps.TryGetValue(appID, out ulong previousToken) && (previousToken == token)) {
Expand Down Expand Up @@ -306,41 +386,23 @@
save = true;
}

if (save) {
Utilities.InBackground(Save);
}
}

private static bool IsValidDepotKey(string depotKey) {
ArgumentException.ThrowIfNullOrEmpty(depotKey);

return (depotKey.Length == 64) && Utilities.IsValidHexadecimalText(depotKey);
}

private static async Task<(bool Success, FrozenSet<uint>? Result)> ResolveKnownDepotIDs(CancellationToken cancellationToken = default) {
if (ASF.WebBrowser == null) {
throw new InvalidOperationException(nameof(ASF.WebBrowser));
}

Uri request = new($"{SharedInfo.ServerURL}/knowndepots.csv");

StreamResponse? response = await ASF.WebBrowser.UrlGetToStream(request, cancellationToken: cancellationToken).ConfigureAwait(false);

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-latest)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-latest)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-latest)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-latest)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-latest)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-latest)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-24.04-arm)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-24.04-arm)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-24.04-arm)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, generic)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, generic)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, generic)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-latest)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-latest)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-latest)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm64)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm64)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm64)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-15-intel)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-15-intel)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-15-intel)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-x64)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-x64)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-x64)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-11-arm)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-11-arm)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-11-arm)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-x64)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-x64)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-x64)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-x64)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-x64)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-x64)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-arm64)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-arm64)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-arm64)

The name 'request' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-arm64)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-arm64)

The name 'cancellationToken' does not exist in the current context

Check failure on line 389 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-arm64)

The name 'request' does not exist in the current context

if (response == null) {
return (false, null);

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-latest)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-latest)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-24.04-arm)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, generic)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-latest)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm64)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-15-intel)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-x64)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-11-arm)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-x64)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-x64)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-arm64)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 392 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-arm64)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression
}

HashSet<uint> result;

await using (response.ConfigureAwait(false)) {

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-latest)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-latest)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-24.04-arm)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, generic)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-latest)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm64)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-15-intel)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-x64)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-11-arm)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-x64)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-x64)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-arm64)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 397 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-arm64)

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.
if (response.Content == null) {
return (false, null);

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-latest)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-latest)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, ubuntu-24.04-arm)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, generic)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-latest)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm64)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, macos-15-intel)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-x64)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Release, windows-11-arm)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (ubuntu-latest, linux-arm)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-x64)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-x64)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (macos-latest, osx-arm64)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression

Check failure on line 399 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / publish-asf (windows-latest, win-arm64)

Since 'GlobalCache.UpdateSubmittedData(IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, ulong>, IReadOnlyDictionary<uint, string>)' returns void, a return keyword must not be followed by an object expression
}

try {
using StreamReader reader = new(response.Content);

string? countText = await reader.ReadLineAsync(cancellationToken).ConfigureAwait(false);

Check failure on line 405 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-latest)

The name 'cancellationToken' does not exist in the current context

Check failure on line 405 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-latest)

The name 'cancellationToken' does not exist in the current context

Check failure on line 405 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, ubuntu-24.04-arm)

The name 'cancellationToken' does not exist in the current context

Check failure on line 405 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, macos-15-intel)

The name 'cancellationToken' does not exist in the current context

Check failure on line 405 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-latest)

The name 'cancellationToken' does not exist in the current context

Check failure on line 405 in ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs

View workflow job for this annotation

GitHub Actions / main (Debug, windows-11-arm)

The name 'cancellationToken' does not exist in the current context

if (string.IsNullOrEmpty(countText) || !int.TryParse(countText, out int count) || (count <= 0)) {
ASF.ArchiLogger.LogNullError(countText);
Expand Down
Loading