Пример #1
0
        public static IDisposable Push(string name, object state)
        {
            var temp = Current;
            Current = new ConsoleLogScope(name, state);
            Current.Parent = temp;

            return new DisposableScope();
        }
Пример #2
0
        public IDisposable BeginScope <TState>(TState state)
        {
            if (state == null)
            {
                throw new ArgumentNullException(nameof(state));
            }

            return(ConsoleLogScope.Push(Name, state));
        }
Пример #3
0
        public static IDisposable Push(string name, object state)
        {
            var temp = Current;

            Current        = new ConsoleLogScope(name, state);
            Current.Parent = temp;

            return(new DisposableScope());
        }