patterns-group / code-patterns

Code Patterns: lots of reusable goodies for your .NET project
tribesoftware.org/code-patterns/
BSD 2-Clause "Simplified" License
9 stars 9 forks source link

Provide LinqPad-like "Dump" functionality for all objects. #55

Closed jbatte47 closed 11 years ago

jbatte47 commented 11 years ago

Probably need to use the ObjectGraph concept for breaking a complex type up into an easily-serialized structure. May need to do some research on how best to represent that structure in a debug stream.

prakash-patel commented 11 years ago

I was researching about Dump() and i found this (http://stackoverflow.com/questions/1443548/printing-full-object-graph-using-c-sharp-and-reflection#answer-14498669) on stackoverflow.

jbatte47 commented 11 years ago

Yeah, that thread has some interesting ideas... I wish the debug stream was capable of more than just raw text... I mean, I guess technically it is, but nothing reads it except for loggers and consoles, so raw text is the only thing that makes sense for a universal "Dump" outside of a specialized editor like LINQPad. Since you can use the RazorEngine so easily to create any string output imaginable based on an object instance, I'm actually thinking this needs to be dropped. I'm gonna go ahead and close it.