This commit is contained in:
Archi 2021-08-20 14:31:12 +02:00
parent 9fa55f31f9
commit 3dec189e14
No known key found for this signature in database
GPG key ID: 6B138B4C64555AEA
8 changed files with 14 additions and 14 deletions

View file

@ -50,7 +50,7 @@ namespace ArchiSteamFarm.CustomPlugins.PeriodicGC {
}
}
private static void PerformGC(object? state) {
private static void PerformGC(object? state = null) {
ASF.ArchiLogger.LogGenericWarning("Performing GC, current memory: " + (GC.GetTotalMemory(false) / 1024) + " KB.");
lock (LockObject) {

View file

@ -453,7 +453,7 @@ namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper {
}
}
private static async void SubmitData(object? state) {
private static async void SubmitData(object? state = null) {
if (Bot.Bots == null) {
throw new InvalidOperationException(nameof(Bot.Bots));
}

View file

@ -438,7 +438,7 @@ namespace ArchiSteamFarm.Core {
}
}
private static async void OnAutoUpdatesTimer(object? state) => await UpdateAndRestart().ConfigureAwait(false);
private static async void OnAutoUpdatesTimer(object? state = null) => await UpdateAndRestart().ConfigureAwait(false);
private static async void OnChanged(object sender, FileSystemEventArgs e) {
if (sender == null) {

View file

@ -318,7 +318,7 @@ namespace ArchiSteamFarm.Core {
return true;
}
private async void MatchActively(object? state) {
private async void MatchActively(object? state = null) {
if (!Bot.IsConnectedAndLoggedOn || Bot.BotConfig.TradingPreferences.HasFlag(BotConfig.ETradingPreferences.MatchEverything) || !Bot.BotConfig.TradingPreferences.HasFlag(BotConfig.ETradingPreferences.MatchActively) || (await IsEligibleForMatching().ConfigureAwait(false) != true)) {
Bot.ArchiLogger.LogGenericTrace(Strings.ErrorAborted);

View file

@ -911,7 +911,7 @@ namespace ArchiSteamFarm.Steam {
BotDatabase.AddGamesToRedeemInBackground(gamesToRedeemInBackground);
if ((GamesRedeemerInBackgroundTimer == null) && BotDatabase.HasGamesToRedeemInBackground && IsConnectedAndLoggedOn) {
Utilities.InBackground(() => RedeemGamesInBackground(this));
Utilities.InBackground(() => RedeemGamesInBackground());
}
}
@ -1884,7 +1884,7 @@ namespace ArchiSteamFarm.Steam {
}
}
private async void HeartBeat(object? state) {
private async void HeartBeat(object? state = null) {
if (ASF.GlobalConfig == null) {
throw new InvalidOperationException(nameof(ASF.GlobalConfig));
}
@ -2052,7 +2052,7 @@ namespace ArchiSteamFarm.Steam {
await PluginsCore.OnBotInitModules(this, BotConfig.AdditionalProperties).ConfigureAwait(false);
}
private async void InitPermanentConnectionFailure(object? state) {
private async void InitPermanentConnectionFailure(object? state = null) {
if (!KeepRunning) {
return;
}
@ -2808,7 +2808,7 @@ namespace ArchiSteamFarm.Steam {
Utilities.InBackground(ArchiWebHandler.HasValidApiKey);
if ((GamesRedeemerInBackgroundTimer == null) && BotDatabase.HasGamesToRedeemInBackground) {
Utilities.InBackground(() => RedeemGamesInBackground(this));
Utilities.InBackground(() => RedeemGamesInBackground());
}
ArchiHandler.SetCurrentMode(BotConfig.UserInterfaceMode);
@ -3019,7 +3019,7 @@ namespace ArchiSteamFarm.Steam {
await CheckOccupationStatus().ConfigureAwait(false);
}
private async void OnSendItemsTimer(object? state) => await Actions.SendInventory(filterFunction: item => BotConfig.LootableTypes.Contains(item.Type)).ConfigureAwait(false);
private async void OnSendItemsTimer(object? state = null) => await Actions.SendInventory(filterFunction: item => BotConfig.LootableTypes.Contains(item.Type)).ConfigureAwait(false);
private async void OnServiceMethod(SteamUnifiedMessages.ServiceMethodNotification notification) {
if (notification == null) {
@ -3131,7 +3131,7 @@ namespace ArchiSteamFarm.Steam {
WalletCurrency = callback.Currency;
}
private async void RedeemGamesInBackground(object? state) {
private async void RedeemGamesInBackground(object? state = null) {
if (!await GamesRedeemerInBackgroundSemaphore.WaitAsync(0).ConfigureAwait(false)) {
return;
}
@ -3279,7 +3279,7 @@ namespace ArchiSteamFarm.Steam {
await ArchiHandler.PlayGames(BotConfig.GamesPlayedWhileIdle, BotConfig.CustomGamePlayedWhileIdle).ConfigureAwait(false);
}
private void ResetPlayingWasBlockedWithTimer(object? state) {
private void ResetPlayingWasBlockedWithTimer(object? state = null) {
PlayingWasBlocked = false;
StopPlayingWasBlockedTimer();
}

View file

@ -385,7 +385,7 @@ namespace ArchiSteamFarm.Steam.Cards {
}
}
private async void CheckGamesForFarming(object? state) {
private async void CheckGamesForFarming(object? state = null) {
if (NowFarming || Paused || !Bot.IsConnectedAndLoggedOn) {
return;
}

View file

@ -57,7 +57,7 @@ namespace ArchiSteamFarm.Steam.Integration {
}
}
private static async void RefreshChanges(object? state) {
private static async void RefreshChanges(object? state = null) {
if (!await RefreshSemaphore.WaitAsync(0).ConfigureAwait(false)) {
return;
}

View file

@ -54,7 +54,7 @@ namespace ArchiSteamFarm.Steam.Integration {
public async ValueTask DisposeAsync() => await SaleEventTimer.DisposeAsync().ConfigureAwait(false);
private async void ExploreDiscoveryQueue(object? state) {
private async void ExploreDiscoveryQueue(object? state = null) {
if (!Bot.IsConnectedAndLoggedOn) {
return;
}