Remove build warnings

This commit is contained in:
nicolas.dorier
2021-10-06 12:53:41 +09:00
parent 08bd13b2cd
commit b970f64639
5 changed files with 6 additions and 6 deletions

View File

@@ -155,7 +155,7 @@ namespace BTCPayServer.Controllers
int currentPosition = 0; int currentPosition = 0;
while (currentPosition + 4 < unformattedKey.Length) while (currentPosition + 4 < unformattedKey.Length)
{ {
result.Append(unformattedKey.Substring(currentPosition, 4)).Append(" "); result.Append(unformattedKey.Substring(currentPosition, 4)).Append(' ');
currentPosition += 4; currentPosition += 4;
} }

View File

@@ -157,7 +157,7 @@ namespace BTCPayServer.Controllers
foreach (var currencyCode in currencyCodes) foreach (var currencyCode in currencyCodes)
{ {
if (!first) if (!first)
currencyPairsBuilder.Append(","); currencyPairsBuilder.Append(',');
first = false; first = false;
currencyPairsBuilder.Append($"{baseCrypto}_{currencyCode}"); currencyPairsBuilder.Append($"{baseCrypto}_{currencyCode}");
} }

View File

@@ -207,7 +207,7 @@ namespace BTCPayServer.Payments.Bitcoin
{ {
Logs.PayServer.LogInformation($"Disconnected from WebSocket of NBXplorer ({network.CryptoCode})"); Logs.PayServer.LogInformation($"Disconnected from WebSocket of NBXplorer ({network.CryptoCode})");
_SessionsByCryptoCode.TryRemove(network.CryptoCode, out WebsocketNotificationSession unused); _SessionsByCryptoCode.TryRemove(network.CryptoCode, out WebsocketNotificationSession unused);
if (_SessionsByCryptoCode.Count == 0 && _Cts.IsCancellationRequested) if (_SessionsByCryptoCode.IsEmpty && _Cts.IsCancellationRequested)
{ {
_RunningTask.TrySetResult(true); _RunningTask.TrySetResult(true);
} }

View File

@@ -655,9 +655,9 @@ namespace BTCPayServer.Services.Invoices
if (!string.IsNullOrEmpty(queryObject.TextSearch)) if (!string.IsNullOrEmpty(queryObject.TextSearch))
{ {
var text = queryObject.TextSearch.Truncate(512); 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))); 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) if (queryObject.StartDate != null)

View File

@@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">$(TargetFrameworkOverride)</TargetFramework> <TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">$(TargetFrameworkOverride)</TargetFramework>
<NoWarn>NU1701,CA1816,CA1308,CA1810,CA2208,CA1303,CA2000</NoWarn> <NoWarn>NU1701,CA1816,CA1308,CA1810,CA2208,CA1303,CA2000,CA2016,CA1835,CA2249,CA9998</NoWarn>
<LangVersion>8.0</LangVersion> <LangVersion>8.0</LangVersion>
</PropertyGroup> </PropertyGroup>