public ScannedFileProcessingService()
 {
     _folderWatched     = new CustomFolderSettings();
     _fileSystemWatcher = new FileSystemWatcher();
     _workerThreads     = new List <Thread>();
     _stopEvent         = new ManualResetEvent(false);
 }
        private void PopulateListFileSystemWatchers()
        {
            var fileNameXml = ConfigurationManager.AppSettings["XMLFileFolderSettings"];

            XmlSerializer deserializer =
                new XmlSerializer(typeof(CustomFolderSettings));

            TextReader reader = new StreamReader(fileNameXml);

            object obj = deserializer.Deserialize(reader);

            reader.Close();

            _folderWatched = obj as CustomFolderSettings;
        }