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
Afficher le fichier Open project: JSkimming/Subdomain-Routing

Méthodes publiques

Méthode 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

Méthode 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 méthode

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.
Résultat System

DomainRoute() public méthode

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.
Résultat System

DomainRoute() public méthode

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.
Résultat System

DomainRoute() public méthode

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.
Résultat System

GetRouteData() public méthode

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.
Résultat System.Web.Routing.RouteData

GetVirtualPath() public méthode

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.
Résultat System.Web.Routing.VirtualPathData