using System; namespace Microsoft.Extensions.Logging.Log4Net.AspNetCore.Scope { /// /// A that will not save nor return scopes. /// internal class NullScopeProvider : IExternalScopeProvider { /// /// The singleton instance that represents every . /// internal static NullScopeProvider Instance { get; } = new NullScopeProvider(); /// /// Constructor that prevents external instantiation. /// private NullScopeProvider() { } /// public void ForEachScope(Action callback, TState state) { // All scopes are null scopes so do nothing. } /// public IDisposable Push(object state) { return NullScope.Instance; } } }