HttpMethodConstraint.IHttpRouteConstraint.Match Method (HttpRequestMessage, IHttpRoute, String, IDictionary<String, Object>, HttpRouteDirection)
Determines whether the request was made with an HTTP verb that is one of the allowed verbs for the route.
Namespace: System.Web.Http.Routing
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
bool IHttpRouteConstraint.Match(
HttpRequestMessage request,
IHttpRoute route,
string parameterName,
IDictionary<string, object> values,
HttpRouteDirection routeDirection
)
private:
virtual bool Match(
HttpRequestMessage^ request,
IHttpRoute^ route,
String^ parameterName,
IDictionary<String^, Object^>^ values,
HttpRouteDirection routeDirection
) sealed = IHttpRouteConstraint::Match
private abstract Match :
request:HttpRequestMessage *
route:IHttpRoute *
parameterName:string *
values:IDictionary<string, Object> *
routeDirection:HttpRouteDirection -> bool
private override Match :
request:HttpRequestMessage *
route:IHttpRoute *
parameterName:string *
values:IDictionary<string, Object> *
routeDirection:HttpRouteDirection -> bool
Private Function Match (
request As HttpRequestMessage,
route As IHttpRoute,
parameterName As String,
values As IDictionary(Of String, Object),
routeDirection As HttpRouteDirection
) As Boolean
Implements IHttpRouteConstraint.Match
Parameters
request
Type: System.Net.Http.HttpRequestMessageThe request that is being checked to determine whether it matches the URL.
route
Type: System.Web.Http.Routing.IHttpRouteThe object that is being checked to determine whether it matches the URL.
parameterName
Type: System.StringThe name of the parameter that is being checked.
values
Type: System.Collections.Generic.IDictionary<String, Object>An object that contains the parameters for a route.
routeDirection
Type: System.Web.Http.Routing.HttpRouteDirectionAn object that indicates whether the constraint check is being performed when an incoming request is processed or when a URL is generated.
Return Value
Type: System.Boolean
When ASP.NET routing is processing a request, true if the request was made by using an allowed HTTP verb; otherwise, false. When ASP.NET routing is constructing a URL, true if the supplied values contain an HTTP verb that matches one of the allowed HTTP verbs; otherwise, false. The default is true.
Implements
See Also
HttpMethodConstraint Class
System.Web.Http.Routing Namespace
Return to top