RouteBuilder.BuildDirectRoute Method
Namespace: System.Web.Mvc.Routing
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Overload List
Name | Description | |
---|---|---|
![]() |
BuildDirectRoute(RouteValueDictionary, RouteValueDictionary, RouteValueDictionary, String, MethodInfo) | Builds an Route. |
![]() |
BuildDirectRoute(String, ControllerDescriptor) | Builds an Route for a particular action. |
![]() |
BuildDirectRoute(String, IEnumerable<String>, String, String, MethodInfo, String) | Builds an Route for a particular action. |
See Also
RouteBuilder Class
System.Web.Mvc.Routing Namespace
Return to top
RouteBuilder.BuildDirectRoute Method (RouteValueDictionary, RouteValueDictionary, RouteValueDictionary, String, MethodInfo)
Builds an Route.
Syntax
public virtual Route BuildDirectRoute(
RouteValueDictionary defaults,
RouteValueDictionary constraints,
RouteValueDictionary dataTokens,
string routeTemplate,
MethodInfo targetMethod
)
public:
virtual Route^ BuildDirectRoute(
RouteValueDictionary^ defaults,
RouteValueDictionary^ constraints,
RouteValueDictionary^ dataTokens,
String^ routeTemplate,
MethodInfo^ targetMethod
)
abstract BuildDirectRoute :
defaults:RouteValueDictionary *
constraints:RouteValueDictionary *
dataTokens:RouteValueDictionary *
routeTemplate:string *
targetMethod:MethodInfo -> Route
override BuildDirectRoute :
defaults:RouteValueDictionary *
constraints:RouteValueDictionary *
dataTokens:RouteValueDictionary *
routeTemplate:string *
targetMethod:MethodInfo -> Route
Public Overridable Function BuildDirectRoute (
defaults As RouteValueDictionary,
constraints As RouteValueDictionary,
dataTokens As RouteValueDictionary,
routeTemplate As String,
targetMethod As MethodInfo
) As Route
Parameters
defaults
Type: System.Web.Routing.RouteValueDictionaryThe route defaults.
constraints
Type: System.Web.Routing.RouteValueDictionaryThe route constraints.
- dataTokens
Type: System.Web.Routing.RouteValueDictionary
routeTemplate
Type: System.StringThe detokenized route template.
targetMethod
Type: System.Reflection.MethodInfoThe method that the route attribute has been applied on.
Return Value
Type: System.Web.Routing.Route
The generated Route.
Return to top
RouteBuilder.BuildDirectRoute Method (String, ControllerDescriptor)
Builds an Route for a particular action.
Syntax
public Route BuildDirectRoute(
string routeTemplate,
ControllerDescriptor controllerDescriptor
)
public:
Route^ BuildDirectRoute(
String^ routeTemplate,
ControllerDescriptor^ controllerDescriptor
)
member BuildDirectRoute :
routeTemplate:string *
controllerDescriptor:ControllerDescriptor -> Route
Public Function BuildDirectRoute (
routeTemplate As String,
controllerDescriptor As ControllerDescriptor
) As Route
Parameters
routeTemplate
Type: System.StringThe tokenized route template for the route.
controllerDescriptor
Type: System.Web.Mvc.ControllerDescriptorThe controller the route attribute has been applied on.
Return Value
Type: System.Web.Routing.Route
The generated route.
Return to top
RouteBuilder.BuildDirectRoute Method (String, IEnumerable<String>, String, String, MethodInfo, String)
Builds an Route for a particular action.
Syntax
public Route BuildDirectRoute(
string routeTemplate,
IEnumerable<string> allowedMethods,
string controllerName,
string actionName,
MethodInfo targetMethod,
string areaName
)
public:
Route^ BuildDirectRoute(
String^ routeTemplate,
IEnumerable<String^>^ allowedMethods,
String^ controllerName,
String^ actionName,
MethodInfo^ targetMethod,
String^ areaName
)
member BuildDirectRoute :
routeTemplate:string *
allowedMethods:IEnumerable<string> *
controllerName:string *
actionName:string *
targetMethod:MethodInfo *
areaName:string -> Route
Public Function BuildDirectRoute (
routeTemplate As String,
allowedMethods As IEnumerable(Of String),
controllerName As String,
actionName As String,
targetMethod As MethodInfo,
areaName As String
) As Route
Parameters
routeTemplate
Type: System.StringThe tokenized route template for the route.
allowedMethods
Type: System.Collections.Generic.IEnumerable<String>The HTTP methods supported by the route. A null value specify that all possible methods are supported.
controllerName
Type: System.StringThe name of the associated controller.
actionName
Type: System.StringThe name of the associated action.
targetMethod
Type: System.Reflection.MethodInfoThe method that the route attribute has been applied on.
- areaName
Type: System.String
Return Value
Type: System.Web.Routing.Route
The generated Route.
Return to top