IRouteConstraint.Match Methode

Definition

Bestimmt, ob der URL-Parameter einen gültigen Wert für diese Einschränkung enthält.

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

Parameter

httpContext
HttpContext

Ein Objekt, das Informationen zur HTTP-Anforderung kapselt.

route
IRouter

Der Router, zu dem diese Einschränkung gehört.

routeKey
String

Der Name des Parameters, der überprüft wird.

values
RouteValueDictionary

Ein Wörterbuch, das die Parameter für die URL enthält.

routeDirection
RouteDirection

Ein Objekt, das angibt, ob die Einschränkungsüberprüfung durchgeführt wird, wenn eine eingehende Anforderung verarbeitet oder eine URL generiert wird.

Gibt zurück

true, wenn der URL-Parameter einen gültigen Wert enthält, andernfalls false.

Gilt für: