C# Class ImageResizer.FluentExtensions.ImageUrlBuilder

A class used to build URLs for the ImageResizer URL API
Afficher le fichier Open project: benfoster/ImageResizer.FluentExtensions Class Usage Examples

Méthodes publiques

Méthode Description
AddModifier ( string>.Func modifier ) : ImageUrlBuilder

Adds a URL modifier that will be applied when the image URL is generated

BuildUrl ( string imagePath ) : string

Builds an ImageResizer image URL using the current configuration and assigned modifiers

ClearModifiers ( ) : void

Clears all URL modifiers from this ImageUrlBuilder instance.

ImageUrlBuilder ( ) : System
SetParameter ( string parameterName, string parameterValue ) : ImageUrlBuilder

A quick way of adding parameters to the ImageUrlBuilder configuration

Private Methods

Méthode Description
ApplyConfiguration ( string imagePath ) : string

Applies the current configuration to imagePath

GetModifiedPath ( string path ) : string

Applies the current modifiers to the generated path

Method Details

AddModifier() public méthode

Adds a URL modifier that will be applied when the image URL is generated
If the modifier is null
public AddModifier ( string>.Func modifier ) : ImageUrlBuilder
modifier string>.Func
Résultat ImageUrlBuilder

BuildUrl() public méthode

Builds an ImageResizer image URL using the current configuration and assigned modifiers
public BuildUrl ( string imagePath ) : string
imagePath string The source path of the image
Résultat string

ClearModifiers() public méthode

Clears all URL modifiers from this ImageUrlBuilder instance.
public ClearModifiers ( ) : void
Résultat void

ImageUrlBuilder() public méthode

public ImageUrlBuilder ( ) : System
Résultat System

SetParameter() public méthode

A quick way of adding parameters to the ImageUrlBuilder configuration
If the or are null or empty
public SetParameter ( string parameterName, string parameterValue ) : ImageUrlBuilder
parameterName string The parameter name
parameterValue string The parameter value
Résultat ImageUrlBuilder