public FileOrganizationService(ITaskManager taskManager, IFileOrganizationRepository repo, ILogger logger, IDirectoryWatchers directoryWatchers, ILibraryManager libraryManager, IServerConfigurationManager config, IFileSystem fileSystem)
 {
     _taskManager = taskManager;
     _repo = repo;
     _logger = logger;
     _directoryWatchers = directoryWatchers;
     _libraryManager = libraryManager;
     _config = config;
     _fileSystem = fileSystem;
 }
 public FileOrganizationService(ITaskManager taskManager, IFileOrganizationRepository repo, ILogger logger, ILibraryMonitor libraryMonitor, ILibraryManager libraryManager, IServerConfigurationManager config, IFileSystem fileSystem, IProviderManager providerManager)
 {
     _taskManager = taskManager;
     _repo = repo;
     _logger = logger;
     _libraryMonitor = libraryMonitor;
     _libraryManager = libraryManager;
     _config = config;
     _fileSystem = fileSystem;
     _providerManager = providerManager;
 }
 public FileOrganizationService(ITaskManager taskManager, IFileOrganizationRepository repo, ILogger logger, ILibraryMonitor libraryMonitor, ILibraryManager libraryManager, IServerConfigurationManager config, IFileSystem fileSystem, IProviderManager providerManager)
 {
     _taskManager     = taskManager;
     _repo            = repo;
     _logger          = logger;
     _libraryMonitor  = libraryMonitor;
     _libraryManager  = libraryManager;
     _config          = config;
     _fileSystem      = fileSystem;
     _providerManager = providerManager;
 }
        /// <inheritdoc/>
        public Task RunAsync()
        {
            try
            {
                _repository = GetRepository();
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Error initializing auto-organize database");
            }

            Current = this;
            FileOrganizationService = new FileOrganizationService(_taskManager, _repository, _loggerFactory, _libraryMonitor, _libraryManager, _config, _fileSystem, _providerManager);

            // Convert Config
            _config.ConvertSmartMatchInfo(FileOrganizationService);

            return(Task.CompletedTask);
        }
        public void Run()
        {
            try
            {
                Repository = GetRepository();
            }
            catch (Exception ex)
            {
                _logger.ErrorException("Error initializing auto-organize database", ex);
            }

            Current = this;
            FileOrganizationService = new FileOrganizationService(_taskManager, Repository, _logger, _libraryMonitor, _libraryManager, _config, _fileSystem, _providerManager);

            FileOrganizationService.ItemAdded   += _organizationService_ItemAdded;
            FileOrganizationService.ItemRemoved += _organizationService_ItemRemoved;
            FileOrganizationService.ItemUpdated += _organizationService_ItemUpdated;
            FileOrganizationService.LogReset    += _organizationService_LogReset;
        }
 public FileOrganizationService(
     ITaskManager taskManager,
     IFileOrganizationRepository repo,
     ILoggerFactory loggerFactory,
     ILibraryMonitor libraryMonitor,
     ILibraryManager libraryManager,
     IServerConfigurationManager config,
     IFileSystem fileSystem,
     IProviderManager providerManager)
 {
     _taskManager     = taskManager;
     _repo            = repo;
     _loggerFactory   = loggerFactory;
     _logger          = loggerFactory.CreateLogger <FileOrganizationService>();
     _libraryMonitor  = libraryMonitor;
     _libraryManager  = libraryManager;
     _config          = config;
     _fileSystem      = fileSystem;
     _providerManager = providerManager;
     _namingOptions   = new NamingOptions();
 }
        public Task RunAsync()
        {
            try
            {
                Repository = GetRepository();
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Error initializing auto-organize database");
            }

            Current = this;
            FileOrganizationService = new FileOrganizationService(_taskManager, Repository, _logger, _libraryMonitor, _libraryManager, _config, _fileSystem, _providerManager);

            FileOrganizationService.ItemAdded   += _organizationService_ItemAdded;
            FileOrganizationService.ItemRemoved += _organizationService_ItemRemoved;
            FileOrganizationService.ItemUpdated += _organizationService_ItemUpdated;
            FileOrganizationService.LogReset    += _organizationService_LogReset;

            // Convert Config
            _config.Convert(FileOrganizationService);

            return(Task.CompletedTask);
        }