C# Class ModernApp4Me.WP8.Download.ImageCache

Defines the base clase for image cache implementations.
Show file Open project: smartnsoft/ModernApp4Me Class Usage Examples

Public Methods

Method Description
Clear ( ) : void

Deletes all the images from the cache. This method can block the current thread for a long time; it is advised to call it from a background thread.

Get ( Uri imageUri ) : System.Windows.Media.ImageSource

Retrieves the source for the image with the specified URI from the cache, downloading it if needed.

Get ( string imageUriString ) : System.Windows.Media.ImageSource

Retrieves the source for the image with the specified URI from the cache, downloading it if needed.

ToString ( ) : string

Overrides object.ToString().

Protected Methods

Method Description
GetInternal ( Uri imageUri ) : System.Windows.Media.ImageSource

The actual implementation of ImageCache.Get.

ImageCache ( string name ) : System

Initializes a new ImageCache instance.

Method Details

Clear() public abstract method

Deletes all the images from the cache. This method can block the current thread for a long time; it is advised to call it from a background thread.
public abstract Clear ( ) : void
return void

Get() public method

Retrieves the source for the image with the specified URI from the cache, downloading it if needed.
The method is not called in the UI thread.
public Get ( Uri imageUri ) : System.Windows.Media.ImageSource
imageUri System.Uri The URI of the image. Must be an absolute URI.
return System.Windows.Media.ImageSource

Get() public method

Retrieves the source for the image with the specified URI from the cache, downloading it if needed.
The method is not called in the UI thread.
public Get ( string imageUriString ) : System.Windows.Media.ImageSource
imageUriString string The URI of the image. Must be an absolute URI.
return System.Windows.Media.ImageSource

GetInternal() protected abstract method

The actual implementation of ImageCache.Get.
protected abstract GetInternal ( Uri imageUri ) : System.Windows.Media.ImageSource
imageUri System.Uri
return System.Windows.Media.ImageSource

ImageCache() protected method

Initializes a new ImageCache instance.
protected ImageCache ( string name ) : System
name string
return System

ToString() public method

Overrides object.ToString().
public ToString ( ) : string
return string