Επεξεργασία

Κοινή χρήση μέσω


HttpMethodConstraint.IRouteConstraint.Match Method

Definition

 virtual bool System.Web.Routing.IRouteConstraint.Match(System::Web::HttpContextBase ^ httpContext, System::Web::Routing::Route ^ route, System::String ^ parameterName, System::Web::Routing::RouteValueDictionary ^ values, System::Web::Routing::RouteDirection routeDirection) = System::Web::Routing::IRouteConstraint::Match;
bool IRouteConstraint.Match (System.Web.HttpContextBase httpContext, System.Web.Routing.Route route, string parameterName, System.Web.Routing.RouteValueDictionary values, System.Web.Routing.RouteDirection routeDirection);
abstract member System.Web.Routing.IRouteConstraint.Match : System.Web.HttpContextBase * System.Web.Routing.Route * string * System.Web.Routing.RouteValueDictionary * System.Web.Routing.RouteDirection -> bool
override this.System.Web.Routing.IRouteConstraint.Match : System.Web.HttpContextBase * System.Web.Routing.Route * string * System.Web.Routing.RouteValueDictionary * System.Web.Routing.RouteDirection -> bool
Function Match (httpContext As HttpContextBase, route As Route, parameterName As String, values As RouteValueDictionary, routeDirection As RouteDirection) As Boolean Implements IRouteConstraint.Match

Parameters

httpContext
HttpContextBase

An object that encapsulates information about the HTTP request.

route
Route

The object that is being checked to determine whether it matches the URL.

parameterName
String

The name of the parameter that is being checked.

values
RouteValueDictionary

An object that contains the parameters for a route.

routeDirection
RouteDirection

An object that indicates whether the constraint check is being performed when an incoming request is handled or when a URL is generated.

Returns

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

Implements

Exceptions

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

Remarks

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

Applies to

See also