Add rule to use pattern matching
MODIFY
.editorconfig
.editorconfig
@@ -234,6 +234,9 @@ csharp_style_prefer_range_operator = true:error
# IDE0071: Simplify interpolation
dotnet_style_prefer_simplified_interpolation = true:error
+# IDE0019: Use pattern matching
+csharp_style_pattern_matching_over_as_with_null_check = true:error
+
[*.xaml]
indent_style = space
indent_size = 2

MODIFY
WalletWasabi.Tests/UnitTests/Converters/TxoRef.cs
WalletWasabi.Tests/UnitTests/Converters/TxoRef.cs
@@ -30,8 +30,7 @@ namespace WalletWasabi.Tests.UnitTests.Converters
return true;
}
- var other = obj as TxoRef;
- if (this is null || other is null)
+ if (this is null || !(obj is TxoRef other))
{
return false;
}

Add rule to use pattern matching