private void WatcherOnChanged(object sender, FileSystemEventArgs args, PathKind pathKind)
 {
     _watcherEventQueue.Enqueue(() => {
         lock (_stateLock) {
             _state = _state.OnWatcherFileChangedEvent(sender, args, pathKind);
             _state.OnStateActive();
         }
     });
 }
 public void Enqueue(FileRegistrationKind registrationKind, FullPath path)
 {
     if (_allItemsQueue != null)
     {
         _allItemsQueue.Enqueue(new FileRegistrationEntry(path, registrationKind));
     }
     _queue.Enqueue(new FileRegistrationEntry(path, registrationKind));
 }
 private void DirectoryChangeWatcherOnPathsChanged(IList <PathChangeEntry> changes)
 {
     _taskExecutor.ExecuteAsync(token => {
         if (!_isPaused)
         {
             _pathsChangedQueue.Enqueue(changes);
             _flushPathChangesTaskQueue.Enqueue(FlushPathsChangedQueueTaskId, FlushPathsChangedQueueTask);
         }
     });
 }
 public void Enqueue(FileRegistrationKind registrationKind, FullPath path)
 {
     _queue.Enqueue(new FileRegistrationEntry(path, registrationKind));
 }