HttpRouteCollection.CreateRoute Method (String, IDictionary<String, Object>, IDictionary<String, Object>, IDictionary<String, Object>, )
Creates an IHttpRoute instance.
Namespace: System.Web.Http
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
Public Overridable Function CreateRoute ( _
routeTemplate As String, _
defaults As IDictionary(Of String, Object), _
constraints As IDictionary(Of String, Object), _
dataTokens As IDictionary(Of String, Object), _
handler As HttpMessageHandler _
) As IHttpRoute
'Usage
Dim instance As HttpRouteCollection
Dim routeTemplate As String
Dim defaults As IDictionary(Of String, Object)
Dim constraints As IDictionary(Of String, Object)
Dim dataTokens As IDictionary(Of String, Object)
Dim handler As HttpMessageHandler
Dim returnValue As IHttpRoute
returnValue = instance.CreateRoute(routeTemplate, _
defaults, constraints, dataTokens, _
handler)
public virtual IHttpRoute CreateRoute(
string routeTemplate,
IDictionary<string, Object> defaults,
IDictionary<string, Object> constraints,
IDictionary<string, Object> dataTokens,
HttpMessageHandler handler
)
public:
virtual IHttpRoute^ CreateRoute(
String^ routeTemplate,
IDictionary<String^, Object^>^ defaults,
IDictionary<String^, Object^>^ constraints,
IDictionary<String^, Object^>^ dataTokens,
HttpMessageHandler^ handler
)
abstract CreateRoute :
routeTemplate:string *
defaults:IDictionary<string, Object> *
constraints:IDictionary<string, Object> *
dataTokens:IDictionary<string, Object> *
handler:HttpMessageHandler -> IHttpRoute
override CreateRoute :
routeTemplate:string *
defaults:IDictionary<string, Object> *
constraints:IDictionary<string, Object> *
dataTokens:IDictionary<string, Object> *
handler:HttpMessageHandler -> IHttpRoute
public function CreateRoute(
routeTemplate : String,
defaults : IDictionary<String, Object>,
constraints : IDictionary<String, Object>,
dataTokens : IDictionary<String, Object>,
handler : HttpMessageHandler
) : IHttpRoute
Parameters
routeTemplate
Type: System.StringThe route template.
defaults
Type: System.Collections.Generic.IDictionary<String, Object>An object that contains the default route parameters.
constraints
Type: System.Collections.Generic.IDictionary<String, Object>An object that contains the route constraints.
dataTokens
Type: System.Collections.Generic.IDictionary<String, Object>The route data tokens.
handler
Type: HttpMessageHandlerThe message handler for the route.
Return Value
Type: System.Web.Http.Routing.IHttpRoute
The new IHttpRoute instance.