<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.2" />

NullScope

sealed class NullScope : IDisposable
An empty scope without any logic
using System; using System.Runtime.CompilerServices; namespace Microsoft.Extensions.Logging { internal sealed class NullScope : IDisposable { [System.Runtime.CompilerServices.Nullable(1)] public static NullScope Instance { [System.Runtime.CompilerServices.NullableContext(1)] get; } = new NullScope(); private NullScope() { } public void Dispose() { } } }