示例#1
0
        private static TraceReport Log <T>(TraceLevel level, TraceReport trace, Func <T> data)
        {
            var entry = new LogEntry <T>(level, new Lazy <T>(data))
            {
                Code          = trace.Code,
                CorrelationId = trace.Correlation
            };

            trace.Log(entry);
            return(trace);
        }
示例#2
0
 public static TraceReport Verbose <T>(this TraceReport trace, Func <T> factory) => Log(TraceLevel.Verbose, trace, factory);
示例#3
0
 public static TraceReport Verbose <T>(this TraceReport trace, T data) => Log(TraceLevel.Verbose, trace, data);
示例#4
0
 public static TraceReport Information <T>(this TraceReport trace, Func <T> factory) => Log(TraceLevel.Information, trace, factory);
示例#5
0
 public static TraceReport Information <T>(this TraceReport trace, T data) => Log(TraceLevel.Information, trace, data);
示例#6
0
 public static TraceReport Warning <T>(this TraceReport trace, Func <T> factory) => Log(TraceLevel.Warning, trace, factory);
示例#7
0
 public static TraceReport Warning <T>(this TraceReport trace, T data) => Log(TraceLevel.Warning, trace, data);