C# Class FFImageLoading.Cache.ImageCache

Inheritance: IImageCache
Afficher le fichier Open project: daniel-luberda/FFImageLoading

Méthodes publiques

Méthode Description
Add ( string key, ImageInformation imageInformation, ISelfDisposingBitmapDrawable bitmap ) : void
Add ( string key, ImageInformation imageInformation, WriteableBitmap bitmap ) : void
Clear ( ) : void
Get ( string key ) : ImageInformation>.Tuple
Get ( string key ) : ImageInformation>.Tuple
GetBitmapDrawableFromReusableSet ( Android.Graphics.BitmapFactory options ) : ISelfDisposingBitmapDrawable

Attempts to find a bitmap suitable for reuse based on the given dimensions. Note that any returned instance will have SetIsRetained(true) called on it to ensure that it does not release its resources prematurely as it is leaving cache management. This means you must call SetIsRetained(false) when you no longer need the instance.

GetBitmapSize ( Android.Graphics.Drawables.BitmapDrawable bmp ) : int
GetInfo ( string key ) : ImageInformation
Remove ( string key ) : void
RemoveSimilar ( string baseKey ) : void

Private Methods

Méthode Description
CleanAbandonedItems ( ) : void
GetCacheSizeInPercent ( float percent ) : int

Gets the memory cache size based on a percentage of the max available VM memory.

GetMaxCacheSize ( int maxCacheSize ) : int
ImageCache ( int maxCacheSize, IMiniLogger logger, bool verboseLogging ) : Android.Graphics
ImageCache ( int maxCacheSize, IMiniLogger logger ) : FFImageLoading.Concurrency

Method Details

Add() public méthode

public Add ( string key, ImageInformation imageInformation, ISelfDisposingBitmapDrawable bitmap ) : void
key string
imageInformation ImageInformation
bitmap ISelfDisposingBitmapDrawable
Résultat void

Add() public méthode

public Add ( string key, ImageInformation imageInformation, WriteableBitmap bitmap ) : void
key string
imageInformation ImageInformation
bitmap WriteableBitmap
Résultat void

Clear() public méthode

public Clear ( ) : void
Résultat void

Get() public méthode

public Get ( string key ) : ImageInformation>.Tuple
key string
Résultat ImageInformation>.Tuple

Get() public méthode

public Get ( string key ) : ImageInformation>.Tuple
key string
Résultat ImageInformation>.Tuple

GetBitmapDrawableFromReusableSet() public méthode

Attempts to find a bitmap suitable for reuse based on the given dimensions. Note that any returned instance will have SetIsRetained(true) called on it to ensure that it does not release its resources prematurely as it is leaving cache management. This means you must call SetIsRetained(false) when you no longer need the instance.
public GetBitmapDrawableFromReusableSet ( Android.Graphics.BitmapFactory options ) : ISelfDisposingBitmapDrawable
options Android.Graphics.BitmapFactory Bitmap creation options.
Résultat ISelfDisposingBitmapDrawable

GetBitmapSize() public static méthode

public static GetBitmapSize ( Android.Graphics.Drawables.BitmapDrawable bmp ) : int
bmp Android.Graphics.Drawables.BitmapDrawable
Résultat int

GetInfo() public méthode

public GetInfo ( string key ) : ImageInformation
key string
Résultat ImageInformation

Remove() public méthode

public Remove ( string key ) : void
key string
Résultat void

RemoveSimilar() public méthode

public RemoveSimilar ( string baseKey ) : void
baseKey string
Résultat void