C# Class AdaptiveImages.AdaptiveImageHandler

Inheritance: IHttpHandler
Afficher le fichier Open project: davemcdermid/AdaptiveImages

Méthodes publiques

Méthode Description
AdaptiveImageHandler ( ) : System
ProcessRequest ( HttpContext context ) : void

Private Methods

Méthode Description
BrowserDetect ( HttpContext context ) : bool

Switch off mobile-first if browser is identifying as desktop

GenerateImage ( string source_file, string cache_file, int resolution ) : string

Generates a resized image at a specified resolution from the source_file and saves to the cache_file

GetEncoderForMimeType ( string mimeType ) : System.Drawing.Imaging.ImageCodecInfo

Return the ImageCodecInfo for a given mime-type

RefreshCache ( string source_file, string cache_file, int resolution ) : string

Deletes the cache_file if older than source_file

SendErrorImage ( HttpContext context, string message ) : void

Sends an image to the client with the specified message

SendImage ( HttpContext context, string filename, int browser_cache ) : void

Sends an image to the client with caching enabled

Method Details

AdaptiveImageHandler() public méthode

public AdaptiveImageHandler ( ) : System
Résultat System

ProcessRequest() public méthode

public ProcessRequest ( HttpContext context ) : void
context System.Web.HttpContext
Résultat void