Ejemplo n.º 1
0
 public void TestDispose2()
 {
     using (var proxy = new LogFileProxy(_scheduler, TimeSpan.Zero, _logFile.Object))
     {
         proxy.Dispose();
         _logFile.Verify(l => l.Dispose(), Times.Once);
     }
 }
Ejemplo n.º 2
0
 public void Dispose()
 {
     lock (_syncRoot)
     {
         _analysers.Clear();
         _logFile.Dispose();
         _isDisposed = true;
     }
 }
Ejemplo n.º 3
0
        public void Dispose()
        {
            lock (_syncRoot)
            {
                foreach (var analyser in _analysers.Keys)
                {
                    analyser.Dispose();
                }
                _analysers.Clear();

                _logFile.Dispose();
                _isDiposed = true;
            }
        }
Ejemplo n.º 4
0
        public void Dispose()
        {
            // Technically, MergedDataSource holds this list of data sources, however it does NOT
            // own them and therefore doesn't dispose of them. In this case
            // we (the folder data source) own those child data sources and thus we must dispose
            // of them!
            foreach (var child in OriginalSources)
            {
                child.Dispose();
            }

            _watcher?.Dispose();
            _unfilteredLogFileProxy?.Dispose();
            _mergedDataSource.Dispose();
            _isDisposed = true;
        }
Ejemplo n.º 5
0
 protected override void DisposeAdditional()
 {
     _originalLogFile?.Dispose();
     _unfilteredLogFile?.Dispose();
     _multiLineLogFile?.Dispose();
 }