Esempio n. 1
0
 public static void AddSeparator(TextBuilder textBuilder)
 {
     textBuilder
         .EmptyLine()
         .Line("-------------------------------------------------------------------------------")
         .EmptyLine();
 }
Esempio n. 2
0
 public static void Format(TextBuilder textBuilder, EventProperties properties)
 {
     if (properties.ContainsKey(String.Empty))
         textBuilder.Append("EventData");
     ObjectDumper.DumpObject(
         properties.OrderBy(pair => pair.Key),
         textBuilder);
 }
Esempio n. 3
0
 public string Format(LoggerEvent loggerEvent)
 {
     var textBuilder = new TextBuilder();
     textBuilder
         .Line("EventType: " + loggerEvent.EventType);
     LoggingUtils.Format(textBuilder, loggerEvent.Properties);
     LoggingUtils.AddSeparator(textBuilder);
     return textBuilder.ToString();
 }
Esempio n. 4
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);
 }
Esempio n. 5
0
 public static TextBuilder Format(EventProperties properties)
 {
     var textBuilder = new TextBuilder();
     Format(textBuilder, properties);
     return textBuilder;
 }
Esempio n. 6
0
 public static void DumpObject(Object obj, TextBuilder builder)
 {
     DumpObject(obj, builder, ObjectDumperSettings.Default);
 }
Esempio n. 7
0
 public static String DumpObject(Object obj, ObjectDumperSettings settings)
 {
     var builder = new TextBuilder();
     DumpObject(obj, builder, settings ?? ObjectDumperSettings.Default);
     return builder.ToString();
 }
Esempio n. 8
0
 public static String DumpObject(Object obj)
 {
     var builder = new TextBuilder();
     DumpObject(obj, builder);
     return builder.ToString();
 }