示例#1
0
 public void Dispose()
 {
     Watch.Stop();
     if ((Threshold.TotalMilliseconds == 0) || (Watch.Elapsed > Threshold))
     {
         DiagnosticsLevel.Log(CustomText, $"Elapsed {Watch.Elapsed.Minutes:00}:{Watch.Elapsed.Seconds:00}.{Watch.Elapsed.Milliseconds:000} || {Parameter}");
     }
 }
示例#2
0
 public static void LogUnsupported(this DiagnosticsLevel diagnosticsLevel, String location, Type value)
 {
     diagnosticsLevel.Log($"Not supported value in {location}.", "Value", value.FullName);
 }
示例#3
0
 public static void LogUnexpected(this DiagnosticsLevel diagnosticsLevel, String location, String param, Object value)
 {
     diagnosticsLevel.Log($"Unexpected situation in {location}.", param, value.ToString());
 }
示例#4
0
 public static void LogUnexpected(this DiagnosticsLevel diagnosticsLevel, String location, Exception exception)
 {
     diagnosticsLevel.Log($"Unexpected exception in {location}.", exception);
 }
示例#5
0
 public static void LogUnsupported(this DiagnosticsLevel diagnosticsLevel, String location, Object value)
 {
     diagnosticsLevel.Log($"Not supported value in {location}.", "Value", value.ToString());
 }