Util.Dif with the Uncapsulate() conflict
I'm trying to diff two object with Uncapsulate()
method. It failed.
Util.Dif(model.Uncapsulate().Dump(), model2.Uncapsulate().Dump()).Dump("DIF");
My actual need is to compare two objects including private properties.
My query: https://share.linqpad.net/82aq6kdw.linq
Comments
You need to use
LINQPad.Extensions.Dump(Util.Dif(model .Uncapsulate().Dump(), model2.Uncapsulate()), "DIF");
The intellisense as you type .Dump as you have done is confusing as it implies that Dump will work, but if you try assigning your result to a variable and dumping that variable the intellisense tells it won't and what you need to do,
It works. Thank you so much.