C# Class Subdomain.Routing.Routing.DomainRoute

Provides properties and methods for defining a domain route and for obtaining information about the route.
Inheritance: System.Web.Routing.Route
Show file Open project: JSkimming/Subdomain-Routing

Public Methods

Method Description
DomainRoute ( string domain, string url, RouteValueDictionary defaults ) : System

Initializes a new instance of the DomainRoute class, by using the specified domain and url patterns and default parameter values.

DomainRoute ( string domain, string url, RouteValueDictionary defaults, IRouteHandler routeHandler ) : System

Initializes a new instance of the DomainRoute class, by using the specified domain and url patterns, default parameter values and handler class

DomainRoute ( string domain, string url, object defaults ) : System

Initializes a new instance of the DomainRoute class, by using the specified domain and url patterns and default parameter values.

DomainRoute ( string domain, string url, object defaults, IRouteHandler routeHandler ) : System

Initializes a new instance of the DomainRoute class, by using the specified domain and url patterns, default parameter values and handler class

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

Returns information about the requested route.

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

Returns information about the URL that is associated with the route.

Any domain tokens are removes to prevent them affecting the virtual path.

Private Methods

Method Description
CreatePatternRegex ( string pattern ) : Regex

Creates the regular expression of the route pattern.

RemoveDomainTokens ( RouteValueDictionary values ) : RouteValueDictionary

Removes any domain tokens from the values.

Method Details

DomainRoute() public method

Initializes a new instance of the DomainRoute class, by using the specified domain and url patterns and default parameter values.
public DomainRoute ( string domain, string url, RouteValueDictionary defaults ) : System
domain string The domain pattern for the route.
url string The URL pattern for the route.
defaults RouteValueDictionary The values to use for any parameters that are missing in the URL.
return System

DomainRoute() public method

Initializes a new instance of the DomainRoute class, by using the specified domain and url patterns, default parameter values and handler class
public DomainRoute ( string domain, string url, RouteValueDictionary defaults, IRouteHandler routeHandler ) : System
domain string The domain pattern for the route.
url string The URL pattern for the route.
defaults RouteValueDictionary The values to use for any parameters that are missing in the URL.
routeHandler IRouteHandler The object that processes requests for the route.
return System

DomainRoute() public method

Initializes a new instance of the DomainRoute class, by using the specified domain and url patterns and default parameter values.
public DomainRoute ( string domain, string url, object defaults ) : System
domain string The domain pattern for the route.
url string The URL pattern for the route.
defaults object An object that contains default route values.
return System

DomainRoute() public method

Initializes a new instance of the DomainRoute class, by using the specified domain and url patterns, default parameter values and handler class
public DomainRoute ( string domain, string url, object defaults, IRouteHandler routeHandler ) : System
domain string The domain pattern for the route.
url string The URL pattern for the route.
defaults object An object that contains default route values.
routeHandler IRouteHandler The object that processes requests for the route.
return System

GetRouteData() public method

Returns information about the requested route.
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 information about the URL that is associated with the route.
Any domain tokens are removes to prevent them affecting the virtual path.
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