public void WhenDisposeIsTrueProvidedLoggerIsDisposed()
        {
            var logger   = new DisposeTrackingLogger();
            var provider = new SerilogLoggerProvider(logger, true);

            provider.Dispose();
            Assert.True(logger.IsDisposed);
        }
        public void WhenDisposeIsFalseProvidedLoggerIsNotDisposed()
        {
            var logger   = new DisposeTrackingLogger();
            var provider = new SerilogLoggerProvider(logger, false);

            provider.Dispose();
            Assert.False(logger.IsDisposed);
        }
        public void WhenDisposeIsTrueProvidedLoggerIsDisposed()
        {
#pragma warning disable CA2000 // Dispose objects before losing scope
            var logger = new DisposeTrackingLogger();
#pragma warning restore CA2000 // Dispose objects before losing scope
            var provider = new SerilogLoggerProvider(logger, true);
            provider.Dispose();
            Assert.True(logger.IsDisposed);
        }
 /// <summary>
 /// Disposes the provider.
 /// </summary>
 public void Dispose()
 {
     _provider.Dispose();
 }
 public void Dispose()
 {
     _serilogLoggerProvider.Dispose();
 }
Beispiel #6
0
 public void Dispose() => _provider.Dispose();