Can DumpContainer support MaxDepth 0?
DumpContainer supports MaxDepth (aka DumpDepth) values greater than 0, but seems to treat values of 0 similar to 1. Can this be changed? (CollapseTo 0 works as expected)
A little script to illustrate
var list = Enumerable.Range(1, 2).Select(a => Enumerable.Range(1, 2)).ToList();
for (int depth = 0; depth <= 2; depth++)
{
list.Dump($"Dump with depth={depth}", depth: depth);
new DumpContainer(list, o => { o.MaxDepth = depth; }).Dump($"DumpContainer with MaxDepth={depth}");
list.Dump($"Dump with CollapseTo={depth}", collapseTo: depth);
new DumpContainer(list, o => { o.CollapseTo = depth; }).Dump($"DumpContainer with CollapseTo={depth}");
"".Dump();
}
produces
