Can dif functionality be exteded?
Options
Is it possible for a ToDump method to detect that the dump is part of a Dif(a,b).Dump()?
And know the a and b members at the current dump depth
Comments
-
Not nicely. You could examine the StackTrace for a call to Util.Dif:
class Foo { public int X, Y; object ToDump() => new { X, Y, InDif = new StackTrace().ToString().Contains ("Util.Dif") }; }
-
This is not enough as I want to have a property that display a link with info about the current level of both a and b