C# Класс MvcContrib.Routing.RegexRoute

Наследование: System.Web.Routing.RouteBase
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
GenerateDefaultRouteData System.Web.Routing.RouteData
RealGetVirtualPath System.Web.Routing.VirtualPathData
RegexRoute System
RegexRoute System
RegexRoute System

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

GetRouteData() публичный Метод

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.
Результат System.Web.Routing.RouteData

GetRouteData() публичный Метод

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).
Результат System.Web.Routing.RouteData

GetVirtualPath() публичный Метод

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.
Результат System.Web.Routing.VirtualPathData

RegexRoute() публичный Метод

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.
Результат System

RegexRoute() публичный Метод

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.
Результат System

RegexRoute() публичный Метод

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.
Результат System

RegexRoute() публичный Метод

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.
Результат System