Share via


Route.ProcessConstraint メソッド

定義

パラメーター値がそのパラメーターの制約と一致するかどうかを判別します。

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

パラメーター

httpContext
HttpContextBase

HTTP 要求に関する情報をカプセル化するオブジェクト。

constraint
Object

parameterName をテストするために使用する正規表現またはオブジェクト。

parameterName
String

テストするパラメーターの名前。

values
RouteValueDictionary

テストする値。

routeDirection
RouteDirection

URL ルーティングで受信要求を処理するのか URL を作成するのかを指定する値。

戻り値

パラメーター値が制約と一致する場合は true。それ以外の場合は false

例外

constraint は、正規表現を含む文字列ではありません。

適用対象

こちらもご覧ください