Let 'exclude' work on items of IEnumerable
If I'm Dumping an IEnumerable<Foo>, it would be very nice to be able to use "exclude" to suppress members on the individual items; currently, "exclude" looks for properties on the IEnumerable itself. I can accomplish this by Dumping to a data grid, but I think it should work the same way with rich text as well.
-
Alex Jeffreys commented
var a = new[] { new { X=1, Y=2 } }.Dump (exclude:"X"); // works
IEnumerable b = a;
b.Dump(exclude: "X"); // doesn't work? -
Isn't this how it already works? For example, run this:
new { X=1, Y=2 }.Dump (exclude:"X");
new[] { new { X=1, Y=2 } }.Dump (exclude:"X");In both cases, only Y is dumped.