Example #1
0
        public static StopwatchLog StartNew(ILogger logger)
        {
            StopwatchLog sw = new StopwatchLog(logger);

            sw.Start();
            return(sw);
        }
Example #2
0
 public TimeSpanBlock(string operationName, ILogger logger, LogLevel logLevel = LogLevel.Information)
 {
     _sw            = StopwatchLog.StartNew(logger);
     _operationName = operationName;
     _logLevel      = logLevel;
 }