Skip to content

Commit 4d908fa

Browse files
author
pmosk
committed
Minimal improvements
1 parent 2e5583e commit 4d908fa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/CodeAnalysis.Extensions/Extensions/Ext.GetCollectionType.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static bool IsEnumeratorMethod(IMethodSymbol methodSymbol)
3434
=>
3535
methodSymbol.IsGenericMethod is false &&
3636
methodSymbol.Parameters.Length is 0 &&
37-
string.Equals(methodSymbol.Name, "GetEnumerator");
37+
string.Equals(methodSymbol.Name, "GetEnumerator", StringComparison.InvariantCulture);
3838

3939
static ITypeSymbol? GetEnumeratorType(IMethodSymbol methodSymbol)
4040
=>
@@ -74,7 +74,7 @@ static bool IsMoveNextMethod(IMethodSymbol methodSymbol)
7474
methodSymbol.IsGenericMethod is false &&
7575
methodSymbol.Parameters.Length is 0 &&
7676
methodSymbol.ReturnType.InnerIsType(SystemNamespace, "Boolean") &&
77-
string.Equals(methodSymbol.Name, "MoveNext");
77+
string.Equals(methodSymbol.Name, "MoveNext", StringComparison.InvariantCulture);
7878

7979
static bool IsCurrentProperty(IPropertySymbol propertySymbol)
8080
=>

src/CodeAnalysis.Extensions/Extensions/Ext.GetJsonPropertyName.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ public static string GetJsonPropertyName(this IPropertySymbol propertySymbol)
2424

2525
static bool IsJsonPropertyNameAttribute(AttributeData attributeData)
2626
=>
27-
InnerIsType(attributeData.AttributeClass, "System.Text.Json.Serialization", "JsonPropertyNameAttribute") is true;
27+
InnerIsType(attributeData.AttributeClass, "System.Text.Json.Serialization", "JsonPropertyNameAttribute");
2828
}
2929
}

0 commit comments

Comments
 (0)