Skip to content

Commit 04a5485

Browse files
Chris Martinezcommonsensesoftware
Chris Martinez
authored andcommitted
Use 'is' operator per IDE code analysis
1 parent b224d38 commit 04a5485

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Microsoft.AspNetCore.Mvc.Versioning/Versioning/ActionDescriptorMatch.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ public ActionDescriptorMatch( ActionDescriptor action, RouteData routeData )
6464
/// <returns>True if the objects are equal; otherwise, false.</returns>
6565
public static bool operator ==( ActionDescriptorMatch match1, ActionDescriptorMatch match2 )
6666
{
67-
if ( ReferenceEquals( match1, null ) )
67+
if ( match1 is null )
6868
{
69-
return ReferenceEquals( match2, null );
69+
return match2 is null;
7070
}
71-
else if ( ReferenceEquals( match2, null ) )
71+
else if ( match2 is null )
7272
{
7373
return false;
7474
}
@@ -84,11 +84,11 @@ public ActionDescriptorMatch( ActionDescriptor action, RouteData routeData )
8484
/// <returns>True if the objects are not equal; otherwise, false.</returns>
8585
public static bool operator !=( ActionDescriptorMatch match1, ActionDescriptorMatch match2 )
8686
{
87-
if ( ReferenceEquals( match1, null ) )
87+
if ( match1 is null )
8888
{
89-
return !ReferenceEquals( match2, null );
89+
return !( match2 is null );
9090
}
91-
else if ( ReferenceEquals( match2, null ) )
91+
else if ( match2 is null )
9292
{
9393
return true;
9494
}

0 commit comments

Comments
 (0)