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

@@ -215,8 +215,7 @@ namespace BTCPayServer
public static bool IsLocalNetwork(string server)
{
if (server == null)
throw new ArgumentNullException(nameof(server));
ArgumentNullException.ThrowIfNull(server);
if (Uri.CheckHostName(server) == UriHostNameType.Dns)
{
return server.EndsWith(".internal", StringComparison.OrdinalIgnoreCase) ||