C# Класс 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.
Наследование: IImageCache
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
FullPath string
Querystring string
RequestPath string

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
AugmentSettingsCore ( string>.Dictionary settings ) : string>.Dictionary

Provides an entry point to augmentation of the Settings dictionary

Описание методов

AddImageToCacheAsync() публичный абстрактный Метод

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. ///
Результат System.Threading.Tasks.Task

AugmentSettings() защищенный Метод

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.
Результат void

CreateCachedFileNameAsync() публичный Метод

Gets a string identifying the cached file name.
public CreateCachedFileNameAsync ( ) : Task
Результат Task

ImageCacheBase() защищенный Метод

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. ///
Результат System

IsExpired() защищенный Метод

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. ///
Результат bool

IsNewOrUpdatedAsync() публичный абстрактный Метод

Gets a value indicating whether the image is new or updated in an asynchronous manner.
public abstract IsNewOrUpdatedAsync ( ) : Task
Результат Task

RewritePath() публичный абстрактный Метод

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. ///
Результат void

TrimCacheAsync() публичный абстрактный Метод

Trims the cache of any expired items in an asynchronous manner.
public abstract TrimCacheAsync ( ) : System.Threading.Tasks.Task
Результат System.Threading.Tasks.Task

Описание свойств

FullPath защищенное свойство

The full path for the image.
protected string FullPath
Результат string

Querystring защищенное свойство

The querystring containing processing instructions.
protected string Querystring
Результат string

RequestPath защищенное свойство

The request path for the image.
protected string RequestPath
Результат string