public void TestDispose2() { using (var proxy = new LogFileProxy(_scheduler, TimeSpan.Zero, _logFile.Object)) { proxy.Dispose(); _logFile.Verify(l => l.Dispose(), Times.Once); } }
public void Dispose() { lock (_syncRoot) { _analysers.Clear(); _logFile.Dispose(); _isDisposed = true; } }
public void Dispose() { lock (_syncRoot) { foreach (var analyser in _analysers.Keys) { analyser.Dispose(); } _analysers.Clear(); _logFile.Dispose(); _isDiposed = true; } }
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; }
protected override void DisposeAdditional() { _originalLogFile?.Dispose(); _unfilteredLogFile?.Dispose(); _multiLineLogFile?.Dispose(); }