public IDisposable BeginScope <TState>(TState state) { if (state == null) { throw new ArgumentNullException(nameof(state)); } return(LogScope.Push(_name, state)); }
public static IDisposable Push(string name, object state) { var temp = Current; Current = new LogScope(name, state); Current.Parent = temp; return(new DisposableScope()); }