using Microsoft.Extensions.Logging; using System; namespace Amazon.Lambda.Logging.AspNetCore { /// /// Scope provider that does nothing. /// internal class NullExternalScopeProvider : IExternalScopeProvider { private NullExternalScopeProvider() { } /// /// Returns a cached instance of . /// public static IExternalScopeProvider Instance { get; } = new NullExternalScopeProvider(); /// void IExternalScopeProvider.ForEachScope(Action callback, TState state) { } /// IDisposable IExternalScopeProvider.Push(object state) { return NullScope.Instance; } private sealed class NullScope : IDisposable { public static readonly NullScope Instance = new NullScope(); private NullScope() { } public void Dispose() { } } } }