HttpMethodRouteConstraint.Match Método

Definición

Determina si el parámetro de dirección URL contiene un valor válido para esta restricción.

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

Parámetros

httpContext
HttpContext

Objeto que encapsula la información sobre la solicitud HTTP.

route
IRouter

Enrutador al que pertenece esta restricción.

routeKey
String

Nombre del parámetro que se está comprobando.

values
RouteValueDictionary

Diccionario que contiene los parámetros de la dirección URL.

routeDirection
RouteDirection

Objeto que indica si se realiza la comprobación de restricción cuando se controla una solicitud entrante o cuando se genera una dirección URL.

Devoluciones

true si el parámetro de dirección URL contiene un valor válido; de lo contrario, false.

Implementaciones

Se aplica a