示例#1
0
        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);
        }
示例#2
0
        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();
        }