示例#1
0
        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);
            }
        }
示例#2
0
        public void DisableWatch()
        {
            lock (sync)
            {
                isEnabled = false;

                foreach (var watcher in watchedAssemblies.Values)
                {
                    watcher.EnableRaisingEvents = false;
                }

                this.debouncer?.Cancel();
                this.debouncer = null;
            }
        }