Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public static TraceReport Verbose <T>(this TraceReport trace, Func <T> factory) => Log(TraceLevel.Verbose, trace, factory);
Exemplo n.º 3
0
 public static TraceReport Verbose <T>(this TraceReport trace, T data) => Log(TraceLevel.Verbose, trace, data);
Exemplo n.º 4
0
 public static TraceReport Information <T>(this TraceReport trace, Func <T> factory) => Log(TraceLevel.Information, trace, factory);
Exemplo n.º 5
0
 public static TraceReport Information <T>(this TraceReport trace, T data) => Log(TraceLevel.Information, trace, data);
Exemplo n.º 6
0
 public static TraceReport Warning <T>(this TraceReport trace, Func <T> factory) => Log(TraceLevel.Warning, trace, factory);
Exemplo n.º 7
0
 public static TraceReport Warning <T>(this TraceReport trace, T data) => Log(TraceLevel.Warning, trace, data);