Open dbolin opened 4 years ago
Yep, none of the collection formatters persist the equality comparer.
I guess that's something that should be fixed for some of them.
I think the commonly known types like list, hash set, dictionary,... Should have their equality comparer saved and restored.
For all others, it is not possible I think. We can not assume anything about some custom IList implementation.
For those troublesome cases a custom formatter can be written (which is extremely).
For immutable collections I'll count that as a bug as well. I've added it to my Todo list. Until then, you can use a custom formatter. (let me know if anything is unclear about that :smile:)
Test code:
Actual output: System.OrdinalIgnoreCaseComparer System.Collections.Generic.GenericEqualityComparer`1[System.String]
Expected output: System.OrdinalIgnoreCaseComparer System.OrdinalIgnoreCaseComparer