HttpRouteCollectionExtensions::MapHttpRoute Method
Assembly: System.Web.Http (in System.Web.Http.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | MapHttpRoute(HttpRouteCollection^, String^, String^) | Maps the specified route template. |
![]() ![]() | MapHttpRoute(HttpRouteCollection^, String^, String^, Object^) | Maps the specified route template and sets default route values. |
![]() ![]() | MapHttpRoute(HttpRouteCollection^, String^, String^, Object^, Object^) | Maps the specified route template and sets default route values and constraints. |
![]() ![]() | MapHttpRoute(HttpRouteCollection^, String^, String^, Object^, Object^, HttpMessageHandler^) | Maps the specified route template and sets default route values, constraints, and end-point message handler. |
HttpRouteCollectionExtensions::MapHttpRoute Method (HttpRouteCollection^, String^, String^)
Maps the specified route template.
public: [ExtensionAttribute] static IHttpRoute^ MapHttpRoute( HttpRouteCollection^ routes, String^ name, String^ routeTemplate )
Parameters
- routes
-
Type:
System.Web.Http::HttpRouteCollection^
A collection of routes for the application.
- name
-
Type:
System::String^
The name of the route to map.
- routeTemplate
-
Type:
System::String^
The route template for the route.
HttpRouteCollectionExtensions::MapHttpRoute Method (HttpRouteCollection^, String^, String^, Object^)
Maps the specified route template and sets default route values.
public: [ExtensionAttribute] static IHttpRoute^ MapHttpRoute( HttpRouteCollection^ routes, String^ name, String^ routeTemplate, Object^ defaults )
Parameters
- routes
-
Type:
System.Web.Http::HttpRouteCollection^
A collection of routes for the application.
- name
-
Type:
System::String^
The name of the route to map.
- routeTemplate
-
Type:
System::String^
The route template for the route.
- defaults
-
Type:
System::Object^
An object that contains default route values.
HttpRouteCollectionExtensions::MapHttpRoute Method (HttpRouteCollection^, String^, String^, Object^, Object^)
Maps the specified route template and sets default route values and constraints.
public: [ExtensionAttribute] static IHttpRoute^ MapHttpRoute( HttpRouteCollection^ routes, String^ name, String^ routeTemplate, Object^ defaults, Object^ constraints )
Parameters
- routes
-
Type:
System.Web.Http::HttpRouteCollection^
A collection of routes for the application.
- name
-
Type:
System::String^
The name of the route to map.
- routeTemplate
-
Type:
System::String^
The route template for the route.
- defaults
-
Type:
System::Object^
An object that contains default route values.
- constraints
-
Type:
System::Object^
A set of expressions that specify values for routeTemplate.
HttpRouteCollectionExtensions::MapHttpRoute Method (HttpRouteCollection^, String^, String^, Object^, Object^, HttpMessageHandler^)
Maps the specified route template and sets default route values, constraints, and end-point message handler.
public: [ExtensionAttribute] static IHttpRoute^ MapHttpRoute( HttpRouteCollection^ routes, String^ name, String^ routeTemplate, Object^ defaults, Object^ constraints, HttpMessageHandler^ handler )
Parameters
- routes
-
Type:
System.Web.Http::HttpRouteCollection^
A collection of routes for the application.
- name
-
Type:
System::String^
The name of the route to map.
- routeTemplate
-
Type:
System::String^
The route template for the route.
- defaults
-
Type:
System::Object^
An object that contains default route values.
- constraints
-
Type:
System::Object^
A set of expressions that specify values for routeTemplate.
- handler
-
Type:
System.Net.Http::HttpMessageHandler^
The handler to which the request will be dispatched.

