This documentation is archived and is not being maintained.

HttpMethodConstraint::IRouteConstraint::Match Method

For a description of this member, see Match.

Namespace:  System.Web.Routing
Assembly:  System.Web (in System.Web.dll)

private:
virtual bool Match(
	HttpContextBase^ httpContext, 
	Route^ route, 
	String^ parameterName, 
	RouteValueDictionary^ values, 
	RouteDirection routeDirection
) sealed = IRouteConstraint::Match

Parameters

httpContext
Type: System.Web::HttpContextBase
An object that encapsulates information about the HTTP request.
route
Type: System.Web.Routing::Route
The object that is being checked to determine whether it matches the URL.
parameterName
Type: System::String
The name of the parameter that is being checked.
values
Type: System.Web.Routing::RouteValueDictionary
An object that contains the parameters for a route.
routeDirection
Type: System.Web.Routing::RouteDirection
An object that indicates whether the constraint check is being performed when an incoming request is handled or when a URL is generated.

Return Value

Type: System::Boolean
true if the request was made by using an allowed HTTP verb; otherwise, false. The default is true.

Implements

IRouteConstraint::Match(HttpContextBase, Route, String, RouteValueDictionary, RouteDirection)

ExceptionCondition
ArgumentNullException

One or more of the following parameters is nullptr: httpContext, route, parameterName, or values.

This member is an explicit interface member implementation. It can be used only when the HttpMethodConstraint instance is cast to an IRouteConstraint interface.

.NET Framework

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: