public void StopWatching() { lock (this) { foreach (FileSystemWatcher watcher in watcherMap.Values) { StopWatching(watcher); } this.watcherMap.Clear(); } }