public LoggingFolderWatcherFactory(
     IFolderWatcherFactory folderWatcherFactory,
     ILogger logger)
 {
     _folderWatcherFactory = folderWatcherFactory;
     _logger = logger;
 }
        public FileSystemMonitorService(
            FileSystemMonitorServiceConfiguration configuration,
            IFolderWatcherFactory folderWatcherFactory,
            FileServiceFactory jobManagerFactory,
            SynchronizationServiceFactory synchronizationServiceFactory,
            ILogger logger)
        {
            _logger = logger;
            _folderWatcherFactory = folderWatcherFactory;
            _folderWatcher = folderWatcherFactory.Create(configuration.FolderToMonitor);
            _jobManagerFactory = jobManagerFactory;
            _synchronizationServiceFactory = synchronizationServiceFactory;
            _configuration = configuration;

            _serviceShutdownEvent = new ManualResetEventSlim(false);
            _fileProcessingRoutine = new Task(this.RunServiceOperation, TaskCreationOptions.LongRunning);
            _operationQueue = new Queue<FileSystemWatcherEventArgs>();

            this.SubscribeToEvents();
            this.InitializeServiceState(configuration);
        }