Skip to content

Commit

Permalink
Replace StringComparison.InvariantCultureIgnoreCase with OrdinalIgnor…
Browse files Browse the repository at this point in the history
…eCase (#3436)
  • Loading branch information
meziantou authored Jul 11, 2022
1 parent be6ab71 commit 1c6bb18
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal static void EnsureUnencryptedSupportIsEnabled(OtlpExporterOptions optio
return;
}

if (options.Endpoint.Scheme.Equals("http", StringComparison.InvariantCultureIgnoreCase))
if (options.Endpoint.Scheme.Equals("http", StringComparison.OrdinalIgnoreCase))
{
if (AppContext.TryGetSwitch(
"System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", out var unencryptedIsSupported) == false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private class PropertyFetch
{
public static PropertyFetch Create(TypeInfo type, string propertyName)
{
var property = type.DeclaredProperties.FirstOrDefault(p => string.Equals(p.Name, propertyName, StringComparison.InvariantCultureIgnoreCase));
var property = type.DeclaredProperties.FirstOrDefault(p => string.Equals(p.Name, propertyName, StringComparison.OrdinalIgnoreCase));
if (property == null)
{
property = type.GetProperty(propertyName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public async Task HttpOutCallsAreCollectedSuccessfullyAsync(HttpTestData.HttpOut

foreach (var kv in normalizedAttributesTestCase)
{
Assert.Contains(activity.TagObjects, i => i.Key == kv.Key && i.Value.ToString().Equals(kv.Value, StringComparison.InvariantCultureIgnoreCase));
Assert.Contains(activity.TagObjects, i => i.Key == kv.Key && i.Value.ToString().Equals(kv.Value, StringComparison.OrdinalIgnoreCase));
}

if (tc.RecordException.HasValue && tc.RecordException.Value)
Expand Down

0 comments on commit 1c6bb18

Please # to comment.