Compartir a través de


RouteConstraintMatcher.Match Método

Definición

Determina si routeValues coincide con el proporcionado constraints.

public:
 static bool Match(System::Collections::Generic::IDictionary<System::String ^, Microsoft::AspNetCore::Routing::IRouteConstraint ^> ^ constraints, Microsoft::AspNetCore::Routing::RouteValueDictionary ^ routeValues, Microsoft::AspNetCore::Http::HttpContext ^ httpContext, Microsoft::AspNetCore::Routing::IRouter ^ route, Microsoft::AspNetCore::Routing::RouteDirection routeDirection, Microsoft::Extensions::Logging::ILogger ^ logger);
public static bool Match (System.Collections.Generic.IDictionary<string,Microsoft.AspNetCore.Routing.IRouteConstraint> constraints, Microsoft.AspNetCore.Routing.RouteValueDictionary routeValues, Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, Microsoft.AspNetCore.Routing.RouteDirection routeDirection, Microsoft.Extensions.Logging.ILogger logger);
static member Match : System.Collections.Generic.IDictionary<string, Microsoft.AspNetCore.Routing.IRouteConstraint> * Microsoft.AspNetCore.Routing.RouteValueDictionary * Microsoft.AspNetCore.Http.HttpContext * Microsoft.AspNetCore.Routing.IRouter * Microsoft.AspNetCore.Routing.RouteDirection * Microsoft.Extensions.Logging.ILogger -> bool
Public Shared Function Match (constraints As IDictionary(Of String, IRouteConstraint), routeValues As RouteValueDictionary, httpContext As HttpContext, route As IRouter, routeDirection As RouteDirection, logger As ILogger) As Boolean

Parámetros

constraints
IDictionary<String,IRouteConstraint>

Restricciones de la ruta.

routeValues
RouteValueDictionary

Los valores de parámetro de ruta extraídos de la ruta coincidente.

httpContext
HttpContext

asociado HttpContext a la solicitud actual.

route
IRouter

Enrutador al que pertenece esta restricción.

routeDirection
RouteDirection

Indica si la comprobación de restricciones se realiza cuando se controla la solicitud entrante o cuando se genera una dirección URL.

Devoluciones

true si todos los valores de ruta coinciden con sus restricciones.

Se aplica a