public static TInput D <TInput>(this TInput input, string id = "") { #if DEBUG if (string.IsNullOrWhiteSpace(id)) { Console.WriteLine(MyObjectDumper.Dump(input)); } else { Console.WriteLine(id + ": " + MyObjectDumper.Dump(input)); } #endif return(input); }
public static string Dump(object element, int depth = 4, int indentSize = 2, char indentChar = ' ') { var instance = new MyObjectDumper(depth, indentSize, indentChar); return(instance.DumpElement(element, true)); }