DictionaryExtensions.IsSameAs doesn't handle type conversion for Guids
Closed this issue · 1 comments
badjer commented
ie, if you've got 2 Dictionary<string,object>, a with [Id = "00000..."] and b with [Id = Guid.Parse("00000...")], then this code
a.IsSameAs(b)
returns false
badjer commented
This is as-designed. IsSameAs uses Eq to compare objects, which doesn't do type conversion. To get the above functionality, do the following:
a.IsSameAs(b, a.Keys.Union(b.Keys), (a,b) => a.LazyEq(b))