private MvxImageCache <UIImage> CreateCache(IMvxFileDownloadCache fileDownloadCache) { var configuration = _configuration ?? MvxDownloadCacheConfiguration.Default; var fileCache = new MvxImageCache <UIImage>(fileDownloadCache, configuration.MaxInMemoryFiles, configuration.MaxInMemoryBytes, configuration.DisposeOnRemoveFromCache); return(fileCache); }
private MvxImageCache<UIImage> CreateCache() { var configuration = _configuration ?? MvxDownloadCacheConfiguration.Default; var fileDownloadCache = Mvx.Resolve<IMvxFileDownloadCache>(); var fileCache = new MvxImageCache<UIImage>(fileDownloadCache, configuration.MaxInMemoryFiles, configuration.MaxInMemoryBytes, configuration.DisposeOnRemoveFromCache); return fileCache; }
private MvxImageCache<Bitmap> CreateCache(IMvxFileDownloadCache fileDownloadCache) { var configuration = _configuration ?? MvxDownloadCacheConfiguration.Default; var fileCache = new MvxImageCache<Bitmap>(fileDownloadCache, configuration.MaxInMemoryFiles, configuration.MaxInMemoryBytes, configuration.DisposeOnRemoveFromCache); return fileCache; }
private MvxImageCache <Bitmap> CreateCache() { var configuration = _configuration ?? MvxDownloadCacheConfiguration.Default; var fileDownloadCache = Mvx.Resolve <IMvxFileDownloadCache>(); var fileCache = new MvxImageCache <Bitmap>(fileDownloadCache, configuration.MaxInMemoryFiles, configuration.MaxInMemoryBytes, configuration.DisposeOnRemoveFromCache); return(fileCache); }
protected virtual void InitialiseUIImageProviders() { this.RegisterServiceInstance <IMvxHttpFileDownloader>(new MvxHttpFileDownloader()); #warning Huge Magic numbers here var fileDownloadCache = new MvxFileDownloadCache("Pictures.MvvmCross", "../Library/Caches/Pictures.MvvmCross/", 500, TimeSpan.FromDays(3.0)); var fileCache = new MvxImageCache <UIImage>(fileDownloadCache, 30, 4000000); this.RegisterServiceInstance <IMvxImageCache <UIImage> >(fileCache); this.RegisterServiceInstance <IMvxLocalFileImageLoader <UIImage> >(new MvxTouchLocalFileImageLoader()); }
private MvxImageCache<Texture2D> CreateCache() { var configuration = _configuration ?? MvxDownloadCacheConfiguration.Default; var fileDownloadCache = new MvxFileDownloadCache(configuration.CacheName, configuration.CacheFolderPath, configuration.MaxFiles, configuration.MaxFileAge); var fileCache = new MvxImageCache<Texture2D>(fileDownloadCache, configuration.MaxInMemoryFiles, configuration.MaxInMemoryBytes); return fileCache; }
private MvxImageCache<UIImage> CreateCache() { var configuration = _configuration ?? MvxDownloadCacheConfiguration.Default; var fileDownloadCache = new MvxFileDownloadCache(configuration.CacheName, configuration.CacheFolderPath, configuration.MaxFiles, configuration.MaxFileAge); var fileCache = new MvxImageCache<UIImage>(fileDownloadCache, configuration.MaxInMemoryFiles, configuration.MaxInMemoryBytes, configuration.DisposeOnRemoveFromCache); return fileCache; }
protected virtual void InitialiseBitmapImageProviders() { this.RegisterServiceInstance <IMvxHttpFileDownloader>(new MvxHttpFileDownloader()); var fileDownloadCache = new MvxFileDownloadCache("_PicturesMvvmCross", "_Caches/Pictures.MvvmCross/", 500, TimeSpan.FromDays(3.0)); var fileCache = new MvxImageCache <Bitmap>(fileDownloadCache, 30, 4000000); this.RegisterServiceInstance <IMvxImageCache <Bitmap> >(fileCache); this.RegisterServiceInstance <IMvxLocalFileImageLoader <Bitmap> >(new MvxAndroidLocalFileImageLoader()); }
private MvxImageCache <Bitmap> CreateCache() { var configuration = _configuration ?? MvxDownloadCacheConfiguration.Default; var fileDownloadCache = new MvxFileDownloadCache(configuration.CacheName, configuration.CacheFolderPath, configuration.MaxFiles, configuration.MaxFileAge); var fileCache = new MvxImageCache <Bitmap>(fileDownloadCache, configuration.MaxInMemoryFiles, configuration.MaxInMemoryBytes, configuration.DisposeOnRemoveFromCache); return(fileCache); }
public static IMvxImageCache <UIImage> CreateImageCache( MvxDownloadCacheConfiguration config) { var fileDownloadCache = CreateFileDownloadCache(config); var fileCache = new MvxImageCache <UIImage>( fileDownloadCache, config.MaxInMemoryFiles, config.MaxInMemoryBytes, false); return(fileCache); }
private MvxImageCache <Texture2D> CreateCache() { var configuration = _configuration ?? MvxDownloadCacheConfiguration.Default; var fileDownloadCache = new MvxFileDownloadCache(configuration.CacheName, configuration.CacheFolderPath, configuration.MaxFiles, configuration.MaxFileAge); var fileCache = new MvxImageCache <Texture2D>(fileDownloadCache, configuration.MaxInMemoryFiles, configuration.MaxInMemoryBytes); return(fileCache); }
public void Load() { File.PluginLoader.Instance.EnsureLoaded(); this.RegisterServiceInstance<IMvxHttpFileDownloader>(new MvxHttpFileDownloader()); #warning Huge Magic numbers here - what cache sizes should be used? var fileDownloadCache = new MvxFileDownloadCache("Pictures.MvvmCross", "../Library/Caches/Pictures.MvvmCross/", 500, TimeSpan.FromDays(3.0)); var fileCache = new MvxImageCache<UIImage>(fileDownloadCache, 30, 4000000); this.RegisterServiceInstance<IMvxImageCache<UIImage>>(fileCache); this.RegisterServiceInstance<IMvxLocalFileImageLoader<UIImage>>(new MvxTouchLocalFileImageLoader()); }
public void Load() { #warning One day I would like to decouple this implementation from the FileStore plugin File.PluginLoader.Instance.EnsureLoaded(); Mvx.RegisterSingleton<IMvxHttpFileDownloader>(new MvxHttpFileDownloader()); #warning Huge Magic numbers here - what cache sizes should be used? var fileDownloadCache = new MvxFileDownloadCache("Pictures.MvvmCross", "../Library/Caches/Pictures.MvvmCross/", 500, TimeSpan.FromDays(3.0)); var fileCache = new MvxImageCache<UIImage>(fileDownloadCache, 30, 4000000); Mvx.RegisterSingleton<IMvxImageCache<UIImage>>(fileCache); Mvx.RegisterType<IMvxImageHelper<UIImage>, MvxDynamicImageHelper<UIImage>>(); Mvx.RegisterSingleton<IMvxLocalFileImageLoader<UIImage>>(new MvxTouchLocalFileImageLoader()); }
public void Load() { #warning One day I would like to decouple this implementation from the FileStore plugin File.PluginLoader.Instance.EnsureLoaded(); Mvx.RegisterSingleton <IMvxHttpFileDownloader>(new MvxHttpFileDownloader()); #warning Huge Magic numbers here - what cache sizes should be used? var fileDownloadCache = new MvxFileDownloadCache("Pictures.MvvmCross", "../Library/Caches/Pictures.MvvmCross/", 500, TimeSpan.FromDays(3.0)); var fileCache = new MvxImageCache <UIImage>(fileDownloadCache, 30, 4000000); Mvx.RegisterSingleton <IMvxImageCache <UIImage> >(fileCache); Mvx.RegisterType <IMvxImageHelper <UIImage>, MvxDynamicImageHelper <UIImage> >(); Mvx.RegisterSingleton <IMvxLocalFileImageLoader <UIImage> >(new MvxTouchLocalFileImageLoader()); }
public void Load() { File.PluginLoader.Instance.EnsureLoaded(); this.RegisterServiceInstance<IMvxHttpFileDownloader>(new MvxHttpFileDownloader()); #warning Huge Magic numbers here - what cache sizes should be used? try { var fileDownloadCache = new MvxFileDownloadCache("_PicturesMvvmCross", "_Caches/Pictures.MvvmCross/", 500, TimeSpan.FromDays(3.0)); var fileCache = new MvxImageCache<Bitmap>(fileDownloadCache, 30, 4000000); this.RegisterServiceInstance<IMvxImageCache<Bitmap>>(fileCache); this.RegisterServiceInstance<IMvxLocalFileImageLoader<Bitmap>>(new MvxAndroidLocalFileImageLoader()); } catch (Exception exception) { MvxTrace.Trace(MvxTraceLevel.Error, "Binding", "Exception {0}", exception.ToLongString()); throw; } }
public void Load() { #warning One day I would like to decouple this implementation from the FileStore plugin File.PluginLoader.Instance.EnsureLoaded(); Mvx.RegisterSingleton<IMvxHttpFileDownloader>(new MvxHttpFileDownloader()); #warning Huge Magic numbers here - what cache sizes should be used? try { var fileDownloadCache = new MvxFileDownloadCache("_PicturesMvvmCross", "_Caches/Pictures.MvvmCross/", 500, TimeSpan.FromDays(3.0)); var fileCache = new MvxImageCache<Bitmap>(fileDownloadCache, 30, 4000000); Mvx.RegisterSingleton<IMvxImageCache<Bitmap>>(fileCache); Mvx.RegisterType<IMvxImageHelper<Bitmap>, MvxDynamicImageHelper<Bitmap>>(); Mvx.RegisterSingleton<IMvxLocalFileImageLoader<Bitmap>>(new MvxAndroidLocalFileImageLoader()); } catch (Exception exception) { MvxTrace.Error( "Binding", "Exception {0}", exception.ToLongString()); throw; } }
public void Load() { #warning One day I would like to decouple this implementation from the FileStore plugin File.PluginLoader.Instance.EnsureLoaded(); Mvx.RegisterSingleton <IMvxHttpFileDownloader>(new MvxHttpFileDownloader()); #warning Huge Magic numbers here - what cache sizes should be used? try { var fileDownloadCache = new MvxFileDownloadCache("_PicturesMvvmCross", "_Caches/Pictures.MvvmCross/", 500, TimeSpan.FromDays(3.0)); var fileCache = new MvxImageCache <Bitmap>(fileDownloadCache, 30, 4000000); Mvx.RegisterSingleton <IMvxImageCache <Bitmap> >(fileCache); Mvx.RegisterType <IMvxImageHelper <Bitmap>, MvxDynamicImageHelper <Bitmap> >(); Mvx.RegisterSingleton <IMvxLocalFileImageLoader <Bitmap> >(new MvxAndroidLocalFileImageLoader()); } catch (Exception exception) { MvxTrace.Error("Binding", "Exception {0}", exception.ToLongString()); throw; } }