Breyta

Deila með


Route.ProcessConstraint 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
Protected Overridable Function ProcessConstraint (httpContext As HttpContextBase, constraint As Object, parameterName As String, values As RouteValueDictionary, routeDirection As RouteDirection) As Boolean

Parameters

httpContext
HttpContextBase

An object that encapsulates information about the HTTP request.

constraint
Object

The regular expression or object to use to test parameterName.

parameterName
String

The name of the parameter to test.

values
RouteValueDictionary

The values to test.

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