public override void Dispose() { watcher.Cancel(); watcher.Changed -= WatcherChanged; watcher.Dispose(); base.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(); }