public static void Stop() { foreach (DirectoryWatcher directoryWatcher in DirectoryWatchers.Values) { directoryWatcher.Stop(); } DirectoryWatchers.Clear(); DeviceWatcher.DeviceArrived -= DeviceWatcher_DeviceArrived; DeviceWatcher.DeviceQueryRemove -= DeviceWatcher_DeviceQueryRemove; DeviceWatcher.DeviceRemoveComplete -= DeviceWatcher_DeviceRemoveComplete; }
public void Clear() { _directoryWatchers.Clear(); }