Example #1
0
        private void CheckFiles(object sender, FileSystemEventArgs e)
        {
            int i   = 0;
            var dir = new DirectoryInfo(_targetDirectory);

            foreach (FileInfo file in dir.GetFiles())
            {
                if (_fileList.Contains(file.Name))
                {
                    i++;
                }
            }

            if (i == _fileList.Count)
            {
                Unsubscribe();
                DocumentsReady?.Invoke();
            }
        }
Example #2
0
 private void Stop()
 {
     DocumentsReady?.Invoke();
     Unsubscribe();
 }