- Updated editorconfig rules to hopefully look a bit nicer.

- Removed configureawait(false) from everywhere as it doesnt' do anything in a console app and just makes the code look ugly
- Started using .WhenAll extension instead of Task.WhenAll to make it look nicer when chaining methods
This commit is contained in:
Kwoth
2021-12-28 21:14:26 +01:00
parent d093f7eed7
commit 723447c7d4
171 changed files with 1523 additions and 1594 deletions

View File

@@ -1,4 +1,4 @@
#nullable disable
#nullable disable
using NadekoBot.Services.Database.Models;
using NadekoBot.Modules.Utility.Common.Patreon;
using System.Net.Http.Json;
@@ -49,7 +49,7 @@ public class PatreonRewardsService : INService
_client = client;
if (client.ShardId == 0)
_updater = new(async _ => await RefreshPledges(_credsProvider.GetCreds()).ConfigureAwait(false),
_updater = new(async _ => await RefreshPledges(_credsProvider.GetCreds()),
null, TimeSpan.Zero, Interval);
}
@@ -151,7 +151,7 @@ public class PatreonRewardsService : INService
}
LastUpdate = DateTime.UtcNow;
await getPledgesLocker.WaitAsync().ConfigureAwait(false);
await getPledgesLocker.WaitAsync();
try
{
@@ -170,7 +170,7 @@ public class PatreonRewardsService : INService
PatreonResponse data = null;
do
{
var res = await http.GetStringAsync(page).ConfigureAwait(false);
var res = await http.GetStringAsync(page);
data = JsonSerializer.Deserialize<PatreonResponse>(res);
if (data is null)
@@ -218,7 +218,7 @@ public class PatreonRewardsService : INService
public async Task<int> ClaimReward(ulong userId, string patreonUserId, int cents)
{
await claimLockJustInCase.WaitAsync().ConfigureAwait(false);
await claimLockJustInCase.WaitAsync();
var settings = _gamblingConfigService.Data;
var now = DateTime.UtcNow;
try