Skip to content

Commit c37eb92

Browse files
committed
Change remaining case-insensitive member name comparisons
1 parent 58e8236 commit c37eb92

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Castle.Core/DynamicProxy/Generators/Emitters/ClassEmitter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ internal sealed class ClassEmitter
3434
private readonly List<EventEmitter> events;
3535

3636
private readonly IDictionary<string, FieldReference> fields =
37-
new Dictionary<string, FieldReference>(StringComparer.OrdinalIgnoreCase);
37+
new Dictionary<string, FieldReference>(StringComparer.Ordinal);
3838

3939
private readonly List<MethodEmitter> methods;
4040

src/Castle.Core/DynamicProxy/Internal/TypeUtil.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2004-2021 Castle Project - http://www.castleproject.org/
1+
// Copyright 2004-2025 Castle Project - http://www.castleproject.org/
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -195,12 +195,12 @@ internal static bool IsFinalizer(this MethodInfo methodInfo)
195195

196196
internal static bool IsGetType(this MethodInfo methodInfo)
197197
{
198-
return methodInfo.DeclaringType == typeof(object) && string.Equals("GetType", methodInfo.Name, StringComparison.OrdinalIgnoreCase);
198+
return methodInfo.DeclaringType == typeof(object) && string.Equals("GetType", methodInfo.Name, StringComparison.Ordinal);
199199
}
200200

201201
internal static bool IsMemberwiseClone(this MethodInfo methodInfo)
202202
{
203-
return methodInfo.DeclaringType == typeof(object) && string.Equals("MemberwiseClone", methodInfo.Name, StringComparison.OrdinalIgnoreCase);
203+
return methodInfo.DeclaringType == typeof(object) && string.Equals("MemberwiseClone", methodInfo.Name, StringComparison.Ordinal);
204204
}
205205

206206
internal static void SetStaticField(this Type type, string fieldName, BindingFlags additionalFlags, object? value)
@@ -252,7 +252,7 @@ public static MemberInfo[] Sort(MemberInfo[] members)
252252
{
253253
var sortedMembers = new MemberInfo[members.Length];
254254
Array.Copy(members, sortedMembers, members.Length);
255-
Array.Sort(sortedMembers, (l, r) => string.Compare(l.Name, r.Name, StringComparison.OrdinalIgnoreCase));
255+
Array.Sort(sortedMembers, (l, r) => string.Compare(l.Name, r.Name, StringComparison.Ordinal));
256256
return sortedMembers;
257257
}
258258

0 commit comments

Comments
 (0)