Tomboi88 / dapper-dot-net

Automatically exported from code.google.com/p/dapper-dot-net
Other
0 stars 0 forks source link

Incorrect field name comparison #54

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
GetClassDeserializer<T> contains field selector by name 

let field = prop != null ? null : (fields.FirstOrDefault(p => 
string.Equals(p.Name, n, StringComparison.OrdinalIgnoreCase)) // field case 
sensitive third
                                ?? fields.FirstOrDefault(p => string.Equals(p.Name, n, StringComparison.OrdinalIgnoreCase))) // field case insensitive fourth

as you can see that searches twice with OrdinalIgnoreCase - i suppose that 
should be just Ordinal in the first case

Original issue reported on code.google.com by daniil.b...@gmail.com on 29 Jul 2011 at 4:22

GoogleCodeExporter commented 8 years ago
Well spotted; thanks

Original comment by marc.gravell on 29 Jul 2011 at 6:25