Esempio n. 1
0
        public static void EnableImageLoader(IImageLoaderPlatform imageLoaderPlatform)
        {
            FolderUri storageUri = _filesystem.CreateFolderUri(AppController.Globals.ImageCacheFolderPath);

            _imageLoader            = new ImageLoader(imageLoaderPlatform, 12);
            _imageLoader.StorageUri = storageUri;
        }
Esempio n. 2
0
        public ImageLoader(IImageLoaderPlatform loaderPlatform, int cacheMaxSize = 10)
        {
            _loaderPlatform = loaderPlatform;
            _fileSystem     = loaderPlatform.GetFileSystem();
            _executor       = loaderPlatform.GetExecutor();

            _registeredSets = new Dictionary <int, string>();

            _cacheMaxSize = Math.Max(10, cacheMaxSize);
            _cache        = new LRUCache <string, object>(_cacheMaxSize);

            _downloading             = new List <string>();
            _downloadedSubscriptions = new List <DownloadSubscribtion>();

            _isMimeTypeMandatory = true;
        }