Example #1
0
        public ArtworkCache(IBlobCache cache = null, IArtworkFetcher artworkFetcher = null)
        {
            this.cache = cache ?? BlobCache.LocalMachine;
            this.artworkFetcher = artworkFetcher ?? new MusicBrainzArtworkFetcher();

            this.queue = new OperationQueue(1); // Disk operations should be serialized
            this.storageSemaphore = new KeyedMemoizingSemaphore();
            this.keyedMemoizingSemaphore = new KeyedMemoizingSemaphore();
        }
Example #2
0
        public ArtworkCache(IBlobCache cache = null, IArtworkFetcher artworkFetcher = null)
        {
            this.cache          = cache ?? BlobCache.LocalMachine;
            this.artworkFetcher = artworkFetcher ?? new MusicBrainzArtworkFetcher();

            this.queue                   = new OperationQueue(1); // Disk operations should be serialized
            this.storageSemaphore        = new KeyedMemoizingSemaphore();
            this.keyedMemoizingSemaphore = new KeyedMemoizingSemaphore();
        }