C# Class Canonicalize.Strategies.MapStrategy

URL canonicalization strategy using a map/dictionary data structure to map old paths to new ones.
Inheritance: IUrlStrategy
Mostra file Open project: schourode/canonicalize Class Usage Examples

Public Methods

Method Description
Apply ( UriBuilder uri ) : void

Makes a lookup in the backing dictionary for the path and replaces it if matched.

MapStrategy ( string>.IDictionary dictionary ) : System

Initializes a MapStrategy with a specific backing dictionary.

Method Details

Apply() public method

Makes a lookup in the backing dictionary for the path and replaces it if matched.
public Apply ( UriBuilder uri ) : void
uri System.UriBuilder The URL to be canonicalized.
return void

MapStrategy() public method

Initializes a MapStrategy with a specific backing dictionary.
public MapStrategy ( string>.IDictionary dictionary ) : System
dictionary string>.IDictionary Mapping between old paths (keys) and new paths (values).
return System