Route.ProcessConstraint(HttpContextBase, Object, String, RouteValueDictionary, RouteDirection) Route.ProcessConstraint(HttpContextBase, Object, String, RouteValueDictionary, RouteDirection) Route.ProcessConstraint(HttpContextBase, Object, String, RouteValueDictionary, RouteDirection) Method

Definition

Determines whether a parameter value matches the constraint for that parameter.

protected:
 virtual bool ProcessConstraint(System::Web::HttpContextBase ^ httpContext, System::Object ^ constraint, System::String ^ parameterName, System::Web::Routing::RouteValueDictionary ^ values, System::Web::Routing::RouteDirection routeDirection);
protected virtual bool ProcessConstraint (System.Web.HttpContextBase httpContext, object constraint, string parameterName, System.Web.Routing.RouteValueDictionary values, System.Web.Routing.RouteDirection routeDirection);
abstract member ProcessConstraint : System.Web.HttpContextBase * obj * string * System.Web.Routing.RouteValueDictionary * System.Web.Routing.RouteDirection -> bool
override this.ProcessConstraint : System.Web.HttpContextBase * obj * string * System.Web.Routing.RouteValueDictionary * System.Web.Routing.RouteDirection -> bool

Parameters

httpContext
HttpContextBase HttpContextBase HttpContextBase

An object that encapsulates information about the HTTP request.

constraint
Object Object Object

The regular expression or object to use to test parameterName.

parameterName
String String String

The name of the parameter to test.

routeDirection
RouteDirection RouteDirection RouteDirection

A value that specifies whether URL routing is processing an incoming request or constructing a URL.

Returns

true if the parameter value matches the constraint; otherwise, false.

Exceptions

constraint is not a string that contains a regular expression.

Applies to

See also