ValeraT1982 / ObjectsComparer

C# Framework provides mechanism to compare complex objects, allows to override comparison rules for specific properties and types.
MIT License
352 stars 86 forks source link

Use Dictionary Key for the diff member path #35

Open tmenezes opened 2 years ago

tmenezes commented 2 years ago

Issue: While comparing two dictionaries, it isn't easy to identify what is the item that contains difference if the item key isn't exposed.

Solution proposal: While using dictionaries, the Key property could be used as MemberPath in order to identify the item like the Property Name does for any complex object.

tmenezes commented 2 years ago

I just realized that we have support for ExpandoObject which is an implementation of IDictionary<string, object>... So, it should be straight forward to bring such functionality for regular generic dictionaries as well

ValeraT1982 commented 2 years ago

Make sense. I'll think about it in the next version