Ejemplo n.º 1
0
        public void Start()
        {
            while (Activated)
            {
                Thread.Sleep(CheckInterval);
                string[] allFilesInDirectory = _fileHandler.GetAllFilesInDirectory(_inputLocation);

                for (int i = 0; i < allFilesInDirectory.Length; i++)
                {
                    FileInfo fileInfo = new FileInfo(allFilesInDirectory[i]);

                    Console.WriteLine($"got file {fileInfo.Name}");
                    FileRead(new FileReadEventArgs()
                    {
                        FileInfo = fileInfo
                    });
                }
            }
        }