private static void FileSystemWatcher_Created(object sender, FileSystemEventArgs e) { Console.WriteLine("File created: {0}", e.Name); var fileList = new List <string>(); fileList.Add(e.Name); ServicePool.ProcessFiles(fileList); }
static void Main(string[] args) { var monitor = new FileManager(); List <string> fileList = monitor.GetAllDatFiles(Configuration.InputPath); ServicePool.ProcessFiles(fileList); FileManager.MonitorDirectory(Configuration.InputPath); Console.WriteLine("Monitoring..."); Console.ReadKey(); }