Open wilka opened 4 months ago
Hi @wilka, a similar feature is already supported but it is turned-off by default. It can be turned-on either globally for all dumps or per-dump:
Globally:
DumpConfig.Default.TableConfig.ShowRowSeparators = true;
Per dump:
people.Dump(tableConfig: new TableConfig { ShowRowSeparators = true });
Turning this option on results in the following output:
I know this isn't exactly like what you get from LinqPad, but I'm wondering how we can generalize this. LinqPad basically transposes the table. I will think about it and how it can fit in Dumpify while taking terminal width limitations into account. Thanks for the suggestion!
If it makes any difference, I'm not hugely concerned about the terminal width limits. I tend to run my Windows Terminal at full screen, and I have a large display. But I realise that won't be the case for everyone.
I've been using Dumpify as a stepping stone from taking some LinqPad prototype code, and then turning it into a console app.
One of the handy things with LinqPad
.Dump()
is when you use it on a collection, you get a table with columns for each property. e.g. in LinqPad the code:gives:
but with Dumpify, it shows:
So I'd like to be able to have the more concise column-for-property format with collections.