Filter Dump output using lambda or name list
I often use LinqPad and dump to explore existing data structures that I need to extract data from or reformat.
Many times these structures contain many irrelevant properties and children.
I have often wished for a way to eliminate these from the displayed tree to make the output more readable.
For example, in a parser tree there is often positional information and also many times the original source for the current element.
This takes very much space in the output making it very hard to follow.
If I could supply dump with a lambda that accepted the property name and optionally the parent type I could return true or false and thereby reducing the size and complexity of the result.
For an easier solution, just supplying an array of names to hide would probably be sufficient most of the time.
-
Gábor Győre commented
Does maybe the ToDump method or the Expando object help you here?