예제 #1
0
        /// <summary>
        /// Process event queues
        /// </summary>
        private void EmptyQueues()
        {
            while (true)
            {
                if (_createQueue.Count != 0)
                {
                    OnWatcherCreateEventRedirector?.Invoke(_createQueue.Dequeue());
                }

                if (_changeQueue.Count != 0)
                {
                    OnWatcherChangeEventRedirector?.Invoke(_changeQueue.Dequeue());
                }

                if (_deleteQueue.Count != 0)
                {
                    OnWatcherDeleteEventRedirector?.Invoke(_deleteQueue.Dequeue());
                }
            }
        }
예제 #2
0
 /// <summary>
 /// Redirects FileWatcherEvents to subscribers
 /// </summary>
 private void OnRenameEventHandler(object sender, FileSystemEventArgs args)
 {
     OnWatcherDeleteEventRedirector?.Invoke(args);
     OnWatcherCreateEventRedirector?.Invoke(args);
 }