예제 #1
0
        public static String DumpObject(Object obj, ObjectDumperSettings settings)
        {
            var builder = new TextBuilder();

            DumpObject(obj, builder, settings ?? ObjectDumperSettings.Default);
            return(builder.ToString());
        }
예제 #2
0
 public static void DumpObject(Object obj, TextBuilder builder, ObjectDumperSettings settings)
 {
     var ctx = new DumpContext
                   {
                       Builder = builder,
                     Settings = settings ?? ObjectDumperSettings.Default,
                       RootType = (!settings.DoNotUseToStringMethod || obj == null) ? null : obj.GetType()
                   };
     DumpObject(obj, /*bNeedTypeName*/false, ctx);
 }
예제 #3
0
        public static void DumpObject(Object obj, TextBuilder builder, ObjectDumperSettings settings)
        {
            var ctx = new DumpContext
            {
                Builder  = builder,
                Settings = settings ?? ObjectDumperSettings.Default,
                RootType = (!settings.DoNotUseToStringMethod || obj == null) ? null : obj.GetType()
            };

            DumpObject(obj, /*bNeedTypeName*/ false, ctx);
        }
예제 #4
0
 public static String DumpObject(Object obj, ObjectDumperSettings settings)
 {
     var builder = new TextBuilder();
     DumpObject(obj, builder, settings ?? ObjectDumperSettings.Default);
     return builder.ToString();
 }