Пример #1
0
        private void Dispose(bool disposing)
        {
            if (_isDisposed)
            {
                return;
            }

            lock (this)
            {
                if (_isDisposed)
                {
                    return;
                }

                _isDisposed = true;

                if (disposing)
                {
                    GC.SuppressFinalize(this);
                }

                if (_disposeLogProcessor)
                {
                    LogProcessor.Dispose();
                }

                var logProviders = LogProviders?.GetEnumerator();
                while (logProviders != null && logProviders.MoveNext())
                {
                    (logProviders.Current as IDisposable)?.Dispose();
                }
            }
        }