IRouteConstraint.Match Yöntem

Tanım

URL parametresinin bu kısıtlama için geçerli bir değer içerip içermediğini belirler.

public:
 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
Public Function Match (httpContext As HttpContext, route As IRouter, routeKey As String, values As RouteValueDictionary, routeDirection As RouteDirection) As Boolean

Parametreler

httpContext
HttpContext

HTTP isteği hakkındaki bilgileri kapsülleyen bir nesne.

route
IRouter

Bu kısıtlamanın ait olduğu yönlendirici.

routeKey
String

Denetlenen parametrenin adı.

values
RouteValueDictionary

URL'nin parametrelerini içeren sözlük.

routeDirection
RouteDirection

Gelen istek işlenirken veya URL oluşturulurken kısıtlama denetiminin gerçekleştirilip gerçekleştirilmediğini gösteren nesne.

Döndürülenler

true URL parametresi geçerli bir değer içeriyorsa; aksi takdirde , false.

Şunlara uygulanır