RouteBuilder.BuildDirectRoute Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
BuildDirectRoute(String, ControllerDescriptor) |
Builds an Route for a particular action. |
BuildDirectRoute(RouteValueDictionary, RouteValueDictionary, RouteValueDictionary, String, MethodInfo) |
Builds an Route. |
BuildDirectRoute(String, IEnumerable<String>, String, String, MethodInfo, String) |
Builds an Route for a particular action. |
BuildDirectRoute(String, ControllerDescriptor)
Builds an Route for a particular action.
public System.Web.Routing.Route BuildDirectRoute (string routeTemplate, System.Web.Mvc.ControllerDescriptor controllerDescriptor);
member this.BuildDirectRoute : string * System.Web.Mvc.ControllerDescriptor -> System.Web.Routing.Route
Public Function BuildDirectRoute (routeTemplate As String, controllerDescriptor As ControllerDescriptor) As Route
Parameters
- routeTemplate
- String
The tokenized route template for the route.
- controllerDescriptor
- ControllerDescriptor
The controller the route attribute has been applied on.
Returns
The generated route.
Applies to
BuildDirectRoute(RouteValueDictionary, RouteValueDictionary, RouteValueDictionary, String, MethodInfo)
Builds an Route.
public virtual System.Web.Routing.Route BuildDirectRoute (System.Web.Routing.RouteValueDictionary defaults, System.Web.Routing.RouteValueDictionary constraints, System.Web.Routing.RouteValueDictionary dataTokens, string routeTemplate, System.Reflection.MethodInfo targetMethod);
abstract member BuildDirectRoute : System.Web.Routing.RouteValueDictionary * System.Web.Routing.RouteValueDictionary * System.Web.Routing.RouteValueDictionary * string * System.Reflection.MethodInfo -> System.Web.Routing.Route
override this.BuildDirectRoute : System.Web.Routing.RouteValueDictionary * System.Web.Routing.RouteValueDictionary * System.Web.Routing.RouteValueDictionary * string * System.Reflection.MethodInfo -> System.Web.Routing.Route
Public Overridable Function BuildDirectRoute (defaults As RouteValueDictionary, constraints As RouteValueDictionary, dataTokens As RouteValueDictionary, routeTemplate As String, targetMethod As MethodInfo) As Route
Parameters
- defaults
- RouteValueDictionary
The route defaults.
- constraints
- RouteValueDictionary
The route constraints.
- dataTokens
- RouteValueDictionary
- routeTemplate
- String
The detokenized route template.
- targetMethod
- MethodInfo
The method that the route attribute has been applied on.
Returns
The generated Route.
Applies to
BuildDirectRoute(String, IEnumerable<String>, String, String, MethodInfo, String)
Builds an Route for a particular action.
public System.Web.Routing.Route BuildDirectRoute (string routeTemplate, System.Collections.Generic.IEnumerable<string> allowedMethods, string controllerName, string actionName, System.Reflection.MethodInfo targetMethod, string areaName);
member this.BuildDirectRoute : string * seq<string> * string * string * System.Reflection.MethodInfo * string -> System.Web.Routing.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
- String
The tokenized route template for the route.
- allowedMethods
- IEnumerable<String>
The HTTP methods supported by the route. A null value specify that all possible methods are supported.
- controllerName
- String
The name of the associated controller.
- actionName
- String
The name of the associated action.
- targetMethod
- MethodInfo
The method that the route attribute has been applied on.
- areaName
- String
Returns
The generated Route.