次の方法で共有


LongRouteConstraint.Match メソッド

定義

URL パラメーターにこの制約の正しい値が含まれているかどうかを判断します。

public:
 virtual bool Match(Microsoft::AspNetCore::Http::HttpContext ^ httpContext, Microsoft::AspNetCore::Routing::IRouter ^ route, System::String ^ routeKey, Microsoft::AspNetCore::Routing::RouteValueDictionary ^ values, Microsoft::AspNetCore::Routing::RouteDirection routeDirection);
public bool Match (Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection);
public bool Match (Microsoft.AspNetCore.Http.HttpContext? httpContext, Microsoft.AspNetCore.Routing.IRouter? route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection);
abstract member Match : Microsoft.AspNetCore.Http.HttpContext * Microsoft.AspNetCore.Routing.IRouter * string * Microsoft.AspNetCore.Routing.RouteValueDictionary * Microsoft.AspNetCore.Routing.RouteDirection -> bool
override this.Match : Microsoft.AspNetCore.Http.HttpContext * Microsoft.AspNetCore.Routing.IRouter * string * Microsoft.AspNetCore.Routing.RouteValueDictionary * Microsoft.AspNetCore.Routing.RouteDirection -> bool
Public Function Match (httpContext As HttpContext, route As IRouter, routeKey As String, values As RouteValueDictionary, routeDirection As RouteDirection) As Boolean

パラメーター

httpContext
HttpContext

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

route
IRouter

この制約が属するルーター。

routeKey
String

チェックされるパラメーターの名前。

values
RouteValueDictionary

URL のパラメーターを含むディクショナリ。

routeDirection
RouteDirection

受信要求の処理時、または URL の生成時に、制約チェックが実行されるかどうかを示すオブジェクト。

戻り値

URL パラメーターに正しい値が含まれている場合は true、それ以外の場合は false

実装

適用対象