public void EnableWatch(Func <IEnumerable <string>, bool> reloader) { lock (sync) { isEnabled = true; foreach (var watcher in watchedAssemblies.Values) { watcher.EnableRaisingEvents = true; } this.debouncer = new ReloadDebouncer(dispatcher, reloader); } }
public void DisableWatch() { lock (sync) { isEnabled = false; foreach (var watcher in watchedAssemblies.Values) { watcher.EnableRaisingEvents = false; } this.debouncer?.Cancel(); this.debouncer = null; } }