@@ -29,7 +29,7 @@ internal static class RecordExpressionExtensions
2929 Utils . CheckArgumentNull ( record , nameof ( record ) ) ;
3030 Utils . CheckArgumentNull ( propertyName , nameof ( propertyName ) ) ;
3131
32- return ( record . Properties ? . FirstOrDefault ( e => e . Name == propertyName ) is IEdmPropertyConstructor property &&
32+ return ( record . Properties ? . FirstOrDefault ( e => propertyName . Equals ( e . Name , StringComparison . Ordinal ) ) is IEdmPropertyConstructor property &&
3333 property . Value is IEdmIntegerConstantExpression value ) ?
3434 value . Value :
3535 null ;
@@ -46,7 +46,7 @@ public static string GetString(this IEdmRecordExpression record, string property
4646 Utils . CheckArgumentNull ( record , nameof ( record ) ) ;
4747 Utils . CheckArgumentNull ( propertyName , nameof ( propertyName ) ) ;
4848
49- return ( record . Properties ? . FirstOrDefault ( e => e . Name == propertyName ) is IEdmPropertyConstructor property &&
49+ return ( record . Properties ? . FirstOrDefault ( e => propertyName . Equals ( e . Name , StringComparison . Ordinal ) ) is IEdmPropertyConstructor property &&
5050 property . Value is IEdmStringConstantExpression value ) ?
5151 value . Value :
5252 null ;
@@ -63,7 +63,7 @@ public static string GetString(this IEdmRecordExpression record, string property
6363 Utils . CheckArgumentNull ( record , nameof ( record ) ) ;
6464 Utils . CheckArgumentNull ( propertyName , nameof ( propertyName ) ) ;
6565
66- return ( record . Properties ? . FirstOrDefault ( e => e . Name == propertyName ) is IEdmPropertyConstructor property &&
66+ return ( record . Properties ? . FirstOrDefault ( e => propertyName . Equals ( e . Name , StringComparison . Ordinal ) ) is IEdmPropertyConstructor property &&
6767 property . Value is IEdmBooleanConstantExpression value ) ?
6868 value . Value :
6969 null ;
@@ -80,7 +80,7 @@ public static string GetString(this IEdmRecordExpression record, string property
8080 Utils . CheckArgumentNull ( record , nameof ( record ) ) ;
8181 Utils . CheckArgumentNull ( propertyName , nameof ( propertyName ) ) ;
8282
83- return ( record . Properties ? . FirstOrDefault ( e => e . Name == propertyName ) is IEdmPropertyConstructor property &&
83+ return ( record . Properties ? . FirstOrDefault ( e => propertyName . Equals ( e . Name , StringComparison . Ordinal ) ) is IEdmPropertyConstructor property &&
8484 property . Value is IEdmDateConstantExpression value ) ?
8585 value . Value :
8686 null ;
@@ -99,7 +99,7 @@ public static string GetString(this IEdmRecordExpression record, string property
9999 Utils . CheckArgumentNull ( record , nameof ( record ) ) ;
100100 Utils . CheckArgumentNull ( propertyName , nameof ( propertyName ) ) ;
101101
102- return ( record . Properties ? . FirstOrDefault ( e => e . Name == propertyName ) is IEdmPropertyConstructor property &&
102+ return ( record . Properties ? . FirstOrDefault ( e => propertyName . Equals ( e . Name , StringComparison . Ordinal ) ) is IEdmPropertyConstructor property &&
103103 property . Value is IEdmEnumMemberExpression value &&
104104 value . EnumMembers != null &&
105105 value . EnumMembers . Any ( ) &&
@@ -121,7 +121,7 @@ public static T GetRecord<T>(this IEdmRecordExpression record, string propertyNa
121121 Utils . CheckArgumentNull ( record , nameof ( record ) ) ;
122122 Utils . CheckArgumentNull ( propertyName , nameof ( propertyName ) ) ;
123123
124- if ( record . Properties ? . FirstOrDefault ( e => e . Name == propertyName ) is IEdmPropertyConstructor property &&
124+ if ( record . Properties ? . FirstOrDefault ( e => propertyName . Equals ( e . Name , StringComparison . Ordinal ) ) is IEdmPropertyConstructor property &&
125125 property . Value is IEdmRecordExpression recordValue )
126126 {
127127 T a = new ( ) ;
@@ -143,7 +143,7 @@ public static string GetPropertyPath(this IEdmRecordExpression record, string pr
143143 Utils . CheckArgumentNull ( record , nameof ( record ) ) ;
144144 Utils . CheckArgumentNull ( propertyName , nameof ( propertyName ) ) ;
145145
146- return ( record . Properties ? . FirstOrDefault ( e => e . Name == propertyName ) is IEdmPropertyConstructor property &&
146+ return ( record . Properties ? . FirstOrDefault ( e => propertyName . Equals ( e . Name , StringComparison . Ordinal ) ) is IEdmPropertyConstructor property &&
147147 property . Value is IEdmPathExpression value ) ?
148148 value . Path :
149149 null ;
@@ -160,7 +160,7 @@ public static IList<string> GetCollectionPropertyPath(this IEdmRecordExpression
160160 Utils . CheckArgumentNull ( record , nameof ( record ) ) ;
161161 Utils . CheckArgumentNull ( propertyName , nameof ( propertyName ) ) ;
162162
163- if ( record . Properties ? . FirstOrDefault ( e => e . Name == propertyName ) is IEdmPropertyConstructor property &&
163+ if ( record . Properties ? . FirstOrDefault ( e => propertyName . Equals ( e . Name , StringComparison . Ordinal ) ) is IEdmPropertyConstructor property &&
164164 property . Value is IEdmCollectionExpression value && value . Elements != null )
165165 {
166166 IList < string > properties =
@@ -189,7 +189,7 @@ public static IList<string> GetCollection(this IEdmRecordExpression record, stri
189189 Utils . CheckArgumentNull ( record , nameof ( record ) ) ;
190190 Utils . CheckArgumentNull ( propertyName , nameof ( propertyName ) ) ;
191191
192- if ( record . Properties ? . FirstOrDefault ( e => e . Name == propertyName ) is IEdmPropertyConstructor property &&
192+ if ( record . Properties ? . FirstOrDefault ( e => propertyName . Equals ( e . Name , StringComparison . Ordinal ) ) is IEdmPropertyConstructor property &&
193193 property . Value is IEdmCollectionExpression collection && collection . Elements != null )
194194 {
195195 IList < string > items = collection . Elements
@@ -215,7 +215,7 @@ public static IList<T> GetCollection<T>(this IEdmRecordExpression record, string
215215 Utils . CheckArgumentNull ( record , nameof ( record ) ) ;
216216 Utils . CheckArgumentNull ( propertyName , nameof ( propertyName ) ) ;
217217
218- if ( record . Properties ? . FirstOrDefault ( e => e . Name == propertyName ) is IEdmPropertyConstructor property &&
218+ if ( record . Properties ? . FirstOrDefault ( e => propertyName . Equals ( e . Name , StringComparison . Ordinal ) ) is IEdmPropertyConstructor property &&
219219 property . Value is IEdmCollectionExpression collection && collection . Elements != null )
220220 {
221221 IList < T > items = new List < T > ( ) ;
0 commit comments