C# Class Canonicalize.CanonicalizeRoute

Applies a number of canonicalization strategies to the requested URL and redirects if applicable.
Inheritance: System.Web.Routing.RouteBase
Exibir arquivo Open project: schourode/canonicalize Class Usage Examples

Public Methods

Method Description
CanonicalizeRoute ( ) : System

Initializes a CanonicalizeRoute with an empty strategy collection.

GetRouteData ( System.Web.HttpContextBase httpContext ) : System.Web.Routing.RouteData

Applies each Strategies in turn. Only if the result differs from the originally requested URL a redirect is returned.

GetVirtualPath ( System.Web.Routing.RequestContext requestContext, RouteValueDictionary values ) : System.Web.Routing.VirtualPathData

Returns null, allowing other routes to provide the canonical URL for the requested route values.

Private Methods

Method Description
GetCanonicalizedRouteData ( System.Web.HttpContextBase httpContext ) : System.Web.Routing.RouteData

Method Details

CanonicalizeRoute() public method

Initializes a CanonicalizeRoute with an empty strategy collection.
public CanonicalizeRoute ( ) : System
return System

GetRouteData() public method

Applies each Strategies in turn. Only if the result differs from the originally requested URL a redirect is returned.
public GetRouteData ( System.Web.HttpContextBase httpContext ) : System.Web.Routing.RouteData
httpContext System.Web.HttpContextBase An object that encapsulates information about the HTTP request.
return System.Web.Routing.RouteData

GetVirtualPath() public method

Returns null, allowing other routes to provide the canonical URL for the requested route values.
public GetVirtualPath ( System.Web.Routing.RequestContext requestContext, RouteValueDictionary values ) : System.Web.Routing.VirtualPathData
requestContext System.Web.Routing.RequestContext An object that encapsulates information about the requested route.
values RouteValueDictionary An object that contains the parameters for a route.
return System.Web.Routing.VirtualPathData