C# Class ImageProcessor.Web.Caching.ImageCacheBase

The image cache base provides methods for implementing the IImageCache interface. It is recommended that any implementations inherit from this class.
Inheritance: IImageCache
Afficher le fichier Open project: JimBobSquarePants/ImageProcessor

Protected Properties

Свойство Type Description
FullPath string
Querystring string
RequestPath string

Méthodes publiques

Méthode Description
AddImageToCacheAsync ( Stream stream, string contentType ) : System.Threading.Tasks.Task

Adds the image to the cache in an asynchronous manner.

CreateCachedFileNameAsync ( ) : Task

Gets a string identifying the cached file name.

IsNewOrUpdatedAsync ( ) : Task

Gets a value indicating whether the image is new or updated in an asynchronous manner.

RewritePath ( HttpContext context ) : void

Rewrites the path to point to the cached image.

TrimCacheAsync ( ) : System.Threading.Tasks.Task

Trims the cache of any expired items in an asynchronous manner.

Méthodes protégées

Méthode Description
AugmentSettings ( string>.Dictionary settings ) : void

Provides a means to augment the cache settings taken from the configuration in derived classes. This allows for configuration of cache objects outside the normal configuration files, for example by using app settings in the Azure platform.

ImageCacheBase ( string requestPath, string fullPath, string querystring ) : System

Initializes a new instance of the ImageCacheBase class.

IsExpired ( System.DateTime creationDate ) : bool

Gets a value indicating whether the given images creation date is out with the prescribed limit.

Private Methods

Méthode Description
AugmentSettingsCore ( string>.Dictionary settings ) : string>.Dictionary

Provides an entry point to augmentation of the Settings dictionary

Method Details

AddImageToCacheAsync() public abstract méthode

Adds the image to the cache in an asynchronous manner.
public abstract AddImageToCacheAsync ( Stream stream, string contentType ) : System.Threading.Tasks.Task
stream Stream /// The stream containing the image data. ///
contentType string /// The content type of the image. ///
Résultat System.Threading.Tasks.Task

AugmentSettings() protected méthode

Provides a means to augment the cache settings taken from the configuration in derived classes. This allows for configuration of cache objects outside the normal configuration files, for example by using app settings in the Azure platform.
protected AugmentSettings ( string>.Dictionary settings ) : void
settings string>.Dictionary The current settings.
Résultat void

CreateCachedFileNameAsync() public méthode

Gets a string identifying the cached file name.
public CreateCachedFileNameAsync ( ) : Task
Résultat Task

ImageCacheBase() protected méthode

Initializes a new instance of the ImageCacheBase class.
protected ImageCacheBase ( string requestPath, string fullPath, string querystring ) : System
requestPath string /// The request path for the image. ///
fullPath string /// The full path for the image. ///
querystring string /// The querystring containing instructions. ///
Résultat System

IsExpired() protected méthode

Gets a value indicating whether the given images creation date is out with the prescribed limit.
protected IsExpired ( System.DateTime creationDate ) : bool
creationDate System.DateTime /// The creation date. ///
Résultat bool

IsNewOrUpdatedAsync() public abstract méthode

Gets a value indicating whether the image is new or updated in an asynchronous manner.
public abstract IsNewOrUpdatedAsync ( ) : Task
Résultat Task

RewritePath() public abstract méthode

Rewrites the path to point to the cached image.
public abstract RewritePath ( HttpContext context ) : void
context System.Web.HttpContext /// The encapsulating all information about the request. ///
Résultat void

TrimCacheAsync() public abstract méthode

Trims the cache of any expired items in an asynchronous manner.
public abstract TrimCacheAsync ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task

Property Details

FullPath protected_oe property

The full path for the image.
protected string FullPath
Résultat string

Querystring protected_oe property

The querystring containing processing instructions.
protected string Querystring
Résultat string

RequestPath protected_oe property

The request path for the image.
protected string RequestPath
Résultat string