MoaidHathot / Dumpify

Adding `.Dump()` extension methods to Console Applications, similar to LinqPad's.
MIT License
959 stars 40 forks source link

Special consideration for DirectoryInfo #22

Open dyster opened 6 months ago

dyster commented 6 months ago

Dump() does print out DirectoryInfo object but the recursive nature of the references (JsonSerializer just fails on it so that's good!) makes a few references up or down the directory tree make the panels start appearing very squashed. I don't know if it is the aim of Dumpify to remain generic for all objects of if special consideration be given for certain types? If so I think there are many improvements that could be made for DirInfo, like not printing all info for recursive reference and just the dirname, maybe put it in a tree instead of nested panels etc..

dyster commented 6 months ago

And FileInfo, FileSystemInfo etc

MoaidHathot commented 6 months ago

Hi, thanks for the suggestion! I just tried to dump DirectoryInfo and I agree, it isn't great. I do treat some objects differently, and it will be easy to custom handle DirectoryInfo, FileInfo, etc..., we just need to figure out which properties are required and which are not.