private void OnContentsChanged(object sender, FileSystemEventArgs e) { var file = new FileInfo(e.FullPath); if (!Pending.Has(x => x.Name == file.Name)) { _ui.Send(x => Pending.Add(file), null); } ProcessExistingFiles(); }
private void ProcessExistingFiles() { var dir = new DirectoryInfo(Target.Source); foreach (var file in dir.GetFiles(Target.Filter)) { if (!Pending.Has(x => x.Name == file.Name)) { _ui.Send(x => Pending.Add(file), null); } } }