Use ArgumentNullException.ThrowIfNull everywhere (#3239)

This commit is contained in:
Nicolas Dorier
2021-12-28 17:39:54 +09:00
committed by GitHub
parent 9b7ca76b99
commit ed5b159fb6
50 changed files with 122 additions and 244 deletions

View File

@@ -96,10 +96,8 @@ namespace BTCPayServer.Services.Rates
public HttpClientRequestMaker(IAPIRequestHandler api, HttpClient httpClient, CancellationToken cancellationToken)
{
if (api == null)
throw new ArgumentNullException(nameof(api));
if (httpClient == null)
throw new ArgumentNullException(nameof(httpClient));
ArgumentNullException.ThrowIfNull(api);
ArgumentNullException.ThrowIfNull(httpClient);
this.api = api;
_httpClient = httpClient;
_cancellationToken = cancellationToken;