public IndexingService(
            ISQLiteConnectionFactory factory,
            ICacheService cacheService,
            IInfoDownloadService infoDownloadService,
            ITerminationService cancellationService,
            ITrackRepository trackRepository,
            IFolderRepository folderRepository,
            IAlbumArtworkRepository albumArtworkRepository)
        {
            this.cacheService        = cacheService;
            this.infoDownloadService = infoDownloadService;
            this.cancellationService = cancellationService;

            this.trackRepository         = trackRepository;
            this.folderRepository        = folderRepository;
            this.albumArtworkRepository  = albumArtworkRepository;
            this.sqliteConnectionFactory = factory;

            this.watcherManager = new FolderWatcherManager(this.folderRepository);
            this.cache          = new IndexerCache(this.sqliteConnectionFactory);

            SettingsClient.SettingChanged      += SettingsClient_SettingChanged;
            this.watcherManager.FoldersChanged += WatcherManager_FoldersChanged;

            this.isIndexing = false;
        }
예제 #2
0
        public IndexingService(ISQLiteConnectionFactory factory, ICacheService cacheService, ITrackRepository trackRepository,
                               IFolderRepository folderRepository, IFileMetadataFactory fileMetadataFactory)
        {
            this.cacheService        = cacheService;
            this.trackRepository     = trackRepository;
            this.folderRepository    = folderRepository;
            this.factory             = factory;
            this.fileMetadataFactory = fileMetadataFactory;

            this.watcherManager = new FolderWatcherManager(this.folderRepository);
            this.cache          = new IndexerCache(this.factory);

            SettingsClient.SettingChanged      += SettingsClient_SettingChanged;
            this.watcherManager.FoldersChanged += WatcherManager_FoldersChanged;

            this.isIndexing = false;
        }