Dumpify
Dumpify copied to clipboard
Add an option to limit how many elements to render for collections and arrays
As mentioned in the readme:
You can ensure that arrays, dictionaries and collections don't output too much by allowing results to be truncated. Do this by setting the MaxCollectionCount
property in the tableConfig.
int[] arr = [1, 2, 3, 4];
// Outputs only the first two elements and a message that says: ... truncated 2 items
arr.Dump(tableConfig: new () { MaxCollectionCount = 2 });
I saw that you merged the other PR, but I'm guessing this one needs some more thorough review :-P. Let me know if you need any additional information. Happy to help.
Btw, if you want to see what the truncated output looks like: run the unit tests. All variations should be in the test output.
Hi @hermanussen, yes, I need some more time to review this one and think about it :) I hope to be able to go over it this weekend. Thanks BTW for your contributions :)
Hi @MoaidHathot any update on this? Thanks!
@hermanussen, sorry for not updating the progress before. I'm applying some changes and soon will merge this feature.
@hermanussen, sorry for the delay in reviewing and thank you for your contribution, awesome work! I'm working on the next release, and I might change a bit the behavior of this PR to align it with future features, but this is great, thanks!