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); }
public static TraceReport Verbose <T>(this TraceReport trace, Func <T> factory) => Log(TraceLevel.Verbose, trace, factory);
public static TraceReport Verbose <T>(this TraceReport trace, T data) => Log(TraceLevel.Verbose, trace, data);
public static TraceReport Information <T>(this TraceReport trace, Func <T> factory) => Log(TraceLevel.Information, trace, factory);
public static TraceReport Information <T>(this TraceReport trace, T data) => Log(TraceLevel.Information, trace, data);
public static TraceReport Warning <T>(this TraceReport trace, Func <T> factory) => Log(TraceLevel.Warning, trace, factory);
public static TraceReport Warning <T>(this TraceReport trace, T data) => Log(TraceLevel.Warning, trace, data);