diff --git a/BTCPayServer/Controllers/ManageController.2FA.cs b/BTCPayServer/Controllers/ManageController.2FA.cs index 062b32ce9..1496711f2 100644 --- a/BTCPayServer/Controllers/ManageController.2FA.cs +++ b/BTCPayServer/Controllers/ManageController.2FA.cs @@ -155,7 +155,7 @@ namespace BTCPayServer.Controllers int currentPosition = 0; while (currentPosition + 4 < unformattedKey.Length) { - result.Append(unformattedKey.Substring(currentPosition, 4)).Append(" "); + result.Append(unformattedKey.Substring(currentPosition, 4)).Append(' '); currentPosition += 4; } diff --git a/BTCPayServer/Controllers/RateController.cs b/BTCPayServer/Controllers/RateController.cs index f10a2ba8b..b43eb905e 100644 --- a/BTCPayServer/Controllers/RateController.cs +++ b/BTCPayServer/Controllers/RateController.cs @@ -157,7 +157,7 @@ namespace BTCPayServer.Controllers foreach (var currencyCode in currencyCodes) { if (!first) - currencyPairsBuilder.Append(","); + currencyPairsBuilder.Append(','); first = false; currencyPairsBuilder.Append($"{baseCrypto}_{currencyCode}"); } diff --git a/BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs b/BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs index 65c2338f2..e10a91d2a 100644 --- a/BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs +++ b/BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs @@ -207,7 +207,7 @@ namespace BTCPayServer.Payments.Bitcoin { Logs.PayServer.LogInformation($"Disconnected from WebSocket of NBXplorer ({network.CryptoCode})"); _SessionsByCryptoCode.TryRemove(network.CryptoCode, out WebsocketNotificationSession unused); - if (_SessionsByCryptoCode.Count == 0 && _Cts.IsCancellationRequested) + if (_SessionsByCryptoCode.IsEmpty && _Cts.IsCancellationRequested) { _RunningTask.TrySetResult(true); } diff --git a/BTCPayServer/Services/Invoices/InvoiceRepository.cs b/BTCPayServer/Services/Invoices/InvoiceRepository.cs index c12c4c2eb..e50f8b40b 100644 --- a/BTCPayServer/Services/Invoices/InvoiceRepository.cs +++ b/BTCPayServer/Services/Invoices/InvoiceRepository.cs @@ -655,9 +655,9 @@ namespace BTCPayServer.Services.Invoices if (!string.IsNullOrEmpty(queryObject.TextSearch)) { var text = queryObject.TextSearch.Truncate(512); -#pragma warning disable CA1307 // Specify StringComparison +#pragma warning disable CA1310 // Specify StringComparison query = query.Where(i => i.InvoiceSearchData.Any(data => data.Value.StartsWith(text))); -#pragma warning restore CA1307 // Specify StringComparison +#pragma warning restore CA1310 // Specify StringComparison } if (queryObject.StartDate != null) diff --git a/Build/Common.csproj b/Build/Common.csproj index 3735d5720..706c1d457 100644 --- a/Build/Common.csproj +++ b/Build/Common.csproj @@ -2,7 +2,7 @@ netcoreapp3.1 $(TargetFrameworkOverride) - NU1701,CA1816,CA1308,CA1810,CA2208,CA1303,CA2000 + NU1701,CA1816,CA1308,CA1810,CA2208,CA1303,CA2000,CA2016,CA1835,CA2249,CA9998 8.0