Refactoring: Use is null
MODIFY
WalletWasabi.Gui/Rpc/JsonRpcRequest.cs
WalletWasabi.Gui/Rpc/JsonRpcRequest.cs
@@ -34,7 +34,7 @@ namespace WalletWasabi.Gui.Rpc
/// Gets a value indicating whether the JsonRpcRequest is a notification request
/// which means the client is not interested in receiving a response.
/// </summary>
- public bool IsNotification => Id == null;
+ public bool IsNotification => Id is null;
/// <summary>
/// Gets the version of the JSON-RPC protocol. MUST be exactly "2.0".

MODIFY
WalletWasabi/Crypto/UnblindedSignature.cs
WalletWasabi/Crypto/UnblindedSignature.cs
@@ -64,7 +64,7 @@ namespace WalletWasabi.Crypto
public static bool TryParse(string str, out UnblindedSignature? unblindedSignature)
{
unblindedSignature = null;
- if (str == null)
+ if (str is null)
{
throw new ArgumentNullException(nameof(str));
}

MODIFY
WalletWasabi/Extensions/LinqExtensions.cs
WalletWasabi/Extensions/LinqExtensions.cs
@@ -15,7 +15,7 @@ namespace System.Linq
foreach (var item in source)
{
- if (bucket == null)
+ if (bucket is null)
{
bucket = new T[size];
}

MODIFY
WalletWasabi/Helpers/Guard.cs
WalletWasabi/Helpers/Guard.cs
@@ -10,7 +10,7 @@ namespace WalletWasabi.Helpers
{
AssertCorrectParameterName(parameterName);
- if (value == null)
+ if (value is null)
{
throw new ArgumentNullException(parameterName, "Parameter cannot be null.");
}

MODIFY
WalletWasabi/Nito/Collections/Deque.cs
WalletWasabi/Nito/Collections/Deque.cs
@@ -389,7 +389,7 @@ namespace Nito.Collections
return false;
}
- return default(T) == null;
+ return default(T) is null;
}
int IList.Add(object value)

Refactoring: Use is null