/// <summary>
 /// Stops file watchers.
 /// </summary>
 private void StopAllFileWatchers()
 {
     // Avoid deadlock if all file watchers have invalid path by checking IsActive.
     while (!FileWatcherController.CanStopAllFileWatchers() &&
            FileWatcherController.IsActive())
     {
         // Wait for starting file watchers.
         _canStopAll.WaitOne();
     }
     if (FileWatcherController.CanStopAllFileWatchers())
     {
         FileWatcherController.StopAllFileWatchers();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Performs stop all.
 /// </summary>
 private void StopAll()
 {
     FileWatcherController.StopAllFileWatchers();
     EnableDisableControls();
 }