C# Class MvcContrib.Routing.RegexRoute

Inheritance: System.Web.Routing.RouteBase
Datei anzeigen Open project: atomicobject/mvccontrib Class Usage Examples

Private Properties

Property Type Description
GenerateDefaultRouteData System.Web.Routing.RouteData
RealGetVirtualPath System.Web.Routing.VirtualPathData
RegexRoute System
RegexRoute System
RegexRoute System

Public Methods

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

Gets the route data from an incoming request; parses the incoming virtual path and returns the route data that was inside the url.

GetRouteData ( string request ) : System.Web.Routing.RouteData

Gets the route data from the request portion of the url.

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

Used to get a virtual path for a given set of route settings. If the combination of defaults/values doesn't satisfy the url generator tokens: null is returned, signaling that this route isn't correct for the given values.

This function is not used for figuring out the routes. It is only used for generating links for new routes.

RegexRoute ( string regex, Func getVirtualPath, IRouteHandler routeHandler ) : System

Initializes a new instance of the RegexRoute class.

RegexRoute ( string regex, Func getVirtualPath, RouteValueDictionary defaults, IRouteHandler routeHandler ) : System

Initializes a new instance of the RegexRoute class.

RegexRoute ( string regex, IRouteHandler routeHandler ) : System

Initializes a new instance of the RegexRoute class given a regular expression and a route handler.

RegexRoute ( string regex, RouteValueDictionary defaults, IRouteHandler routeHandler ) : System

Initializes a new instance of the RegexRoute class.

Private Methods

Method Description
GenerateDefaultRouteData ( ) : System.Web.Routing.RouteData
RealGetVirtualPath ( System.Web.Routing.RequestContext requestContext, RouteValueDictionary values, RegexRoute thisRoute ) : System.Web.Routing.VirtualPathData
RegexRoute ( string regex, string urlGenerator, Func getVirtualPath, RouteValueDictionary defaults, IRouteHandler routeHandler ) : System
RegexRoute ( string regex, string urlGenerator, IRouteHandler routeHandler ) : System
RegexRoute ( string regex, string urlGenerator, RouteValueDictionary defaults, IRouteHandler routeHandler ) : System

Method Details

GetRouteData() public method

Gets the route data from an incoming request; parses the incoming virtual path and returns the route data that was inside the url.
public GetRouteData ( System.Web.HttpContextBase httpContext ) : System.Web.Routing.RouteData
httpContext System.Web.HttpContextBase The HTTP context containing the url data.
return System.Web.Routing.RouteData

GetRouteData() public method

Gets the route data from the request portion of the url.
public GetRouteData ( string request ) : System.Web.Routing.RouteData
request string The request string (the part after the virtual directory but before the query string).
return System.Web.Routing.RouteData

GetVirtualPath() public method

Used to get a virtual path for a given set of route settings. If the combination of defaults/values doesn't satisfy the url generator tokens: null is returned, signaling that this route isn't correct for the given values.
This function is not used for figuring out the routes. It is only used for generating links for new routes.
public GetVirtualPath ( System.Web.Routing.RequestContext requestContext, RouteValueDictionary values ) : System.Web.Routing.VirtualPathData
requestContext System.Web.Routing.RequestContext The request context.
values RouteValueDictionary The settings to use to generate this virtual path.
return System.Web.Routing.VirtualPathData

RegexRoute() public method

Initializes a new instance of the RegexRoute class.
public RegexRoute ( string regex, Func getVirtualPath, IRouteHandler routeHandler ) : System
regex string The regular expression that this route handler is supposed to handle.
getVirtualPath Func A function to use to generate a virtual path given the request context, incoming route value dictionary and this instance.
routeHandler IRouteHandler The route handler to handle this route.
return System

RegexRoute() public method

Initializes a new instance of the RegexRoute class.
public RegexRoute ( string regex, Func getVirtualPath, RouteValueDictionary defaults, IRouteHandler routeHandler ) : System
regex string The regular expression that this route handler is supposed to handle.
getVirtualPath Func A function to use to generate a virtual path given the request context, incoming route value dictionary and this instance.
defaults RouteValueDictionary Default route values for this route.
routeHandler IRouteHandler The route handler to handle this route.
return System

RegexRoute() public method

Initializes a new instance of the RegexRoute class given a regular expression and a route handler.
public RegexRoute ( string regex, IRouteHandler routeHandler ) : System
regex string The regular expression that this route handler is supposed to handle.
routeHandler IRouteHandler The route handler to handle this route.
return System

RegexRoute() public method

Initializes a new instance of the RegexRoute class.
public RegexRoute ( string regex, RouteValueDictionary defaults, IRouteHandler routeHandler ) : System
regex string The regular expression that this route handler is supposed to handle.
defaults RouteValueDictionary Default route values for this route.
routeHandler IRouteHandler The route handler to handle this route.
return System