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; }
public LifetimeService( ITerminationService cancellationService, IPlaybackService playbackService, IMetadataService metadataService) { this.cancellationService = cancellationService; this.playbackService = playbackService; this.metadataService = metadataService; }
public FileService( ICacheService cacheService, ITerminationService cancellationService, ITrackRepository trackRepository, IContainerProvider container) { this.cacheService = cacheService; this.cancellationService = cancellationService; this.trackRepository = trackRepository; this.container = container; // Unique identifier which will be used by this instance only to create cached artwork. // This prevents the cleanup function to delete artwork which is in use by this instance. this.instanceGuid = Guid.NewGuid().ToString(); this.addFilesTimer = new Timer(); this.addFilesTimer.Interval = this.addFilesMilliseconds; this.addFilesTimer.Elapsed += AddFilesTimerElapsedHandler; #pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed this.DeleteFileArtworkFromCacheAsync(this.instanceGuid); #pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed }