Maintaining a global list for a service.
i am in the process of developing a Windows service that will monitor a hot folder for .xml file(s). Once a file is dropped, the service will call another application passing this .xml.
Now here's where I am stuck.
Instead of sending the .xml file to another app, I want to have a list or any collection for that matter, to which the .xml file name will be added. This will happen as soon as the .xml file is dropped in the hot folder. Then from there the service will process the list of files.
If it is of any help, this service is developed using FileSystemWatcher with a lot of help from the online community (thanks for all the people who have written great/helpful tutorials explaining FileSystemWatcher).
So the idea basically is to maintain a list of files to process, with the list being updated, the file being removed from the list as soon as it is passed on to other application, constantly.
How do I do this.
Any help is greatly appreciated.