C# Класс ImageMagick.Web.Handlers.MagickHandler

Base class for IHttpHandlers that use the IUrlResolver class.
Наследование: IHttpHandler, IRequiresSessionState
Показать файл Открыть проект

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

Метод Описание
ProcessRequest ( HttpContext context ) : void

Enables processing of HTTP Web requests by a custom HttpHandler that implements the IHttpHandler interface.

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

Метод Описание
CanUseCache ( string cacheFileName ) : bool

Returns true if the cache file is newer then the file name that was resolved by the IUrlResolver.

GetCacheFileName ( string directoryName, string subdirectoryKey ) : string

Returns the file name that can be used to cache the result.

MagickHandler ( IUrlResolver urlResolver, MagickFormatInfo formatInfo ) : System

Initializes a new instance of the MagickHandler class.

MoveToCache ( string fileName, string cacheFileName ) : void

Moves to the specified source file name to the destination file name. This is happening in a lock to avoid problems when an other request is reading the file.

WriteFile ( HttpContext context ) : void

Writes the file to the response.

WriteFile ( HttpContext context, string fileName ) : void

Writes the specified file to the response.

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

Метод Описание
AddCacheControlHeader ( HttpResponse response ) : void
CalculateMD5 ( string value ) : string
GetTempFileName ( ) : string
InitializeVersion ( ) : string
Write304 ( HttpContext content, System.DateTime fileDate ) : bool

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

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

Returns true if the cache file is newer then the file name that was resolved by the IUrlResolver.
protected CanUseCache ( string cacheFileName ) : bool
cacheFileName string
Результат bool

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

Returns the file name that can be used to cache the result.
protected GetCacheFileName ( string directoryName, string subdirectoryKey ) : string
directoryName string The name of the subdirectory to store the files in.
subdirectoryKey string The key that will be used to create MD5 hash and that /// will be used as a sub directory.
Результат string

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

Initializes a new instance of the MagickHandler class.
protected MagickHandler ( IUrlResolver urlResolver, MagickFormatInfo formatInfo ) : System
urlResolver IUrlResolver
formatInfo MagickFormatInfo
Результат System

MoveToCache() защищенный статический Метод

Moves to the specified source file name to the destination file name. This is happening in a lock to avoid problems when an other request is reading the file.
protected static MoveToCache ( string fileName, string cacheFileName ) : void
fileName string
cacheFileName string
Результат void

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

Enables processing of HTTP Web requests by a custom HttpHandler that implements the IHttpHandler interface.
public ProcessRequest ( HttpContext context ) : void
context System.Web.HttpContext An HttpContext object that provides references to the intrinsic /// server objects (for example, Request, Response, Session, and Server) used to service /// HTTP requests.
Результат void

WriteFile() защищенный абстрактный Метод

Writes the file to the response.
protected abstract WriteFile ( HttpContext context ) : void
context System.Web.HttpContext
Результат void

WriteFile() защищенный статический Метод

Writes the specified file to the response.
protected static WriteFile ( HttpContext context, string fileName ) : void
context System.Web.HttpContext
fileName string
Результат void