public override void Dispose() { watcher.Cancel(); watcher.Changed -= WatcherChanged; watcher.Dispose(); base.Dispose(); }
protected virtual void Dispose(bool disposing) { if (_fileTransferSubject != null) { _fileTransferSubject.Dispose(); } if (_monitorObserver != null) { _monitorObserver.Dispose(); } if (_monitor != null) { _monitor.Dispose(); } if (_fileScanCts != null) { _fileScanCts.Cancel(); _fileScanCts.Dispose(); } if (_fileCopyCts != null) { _fileCopyCts.Cancel(); _fileCopyCts.Dispose(); } if (_fileTranferLoopCts != null) { _fileTranferLoopCts.Cancel(); _fileTranferLoopCts.Dispose(); } }
void StopWatcher() { if (watcher != null) { watcher.Cancel(); watcher.Changed -= WatcherChanged; watcher.Dispose(); watcher = null; } }
public void Dispose() { reboot_required_monitor.Cancel(); reboot_required_monitor.Changed -= HandleRebootRequired; reboot_required_monitor.Dispose(); }
public void DisposeDoesNotThrow() { var monitor = new FileMonitor(this.file.FullName); monitor.Dispose(); }
public void Dispose() { instance.Dispose(); watcher.Verify(item => item.Dispose()); }