Partilhar via


RouteConstraintMatcher.Match Método

Definição

Determina se corresponde routeValues ao fornecido 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>

As restrições para a rota.

routeValues
RouteValueDictionary

Os valores de parâmetro de rota extraídos da rota correspondente.

httpContext
HttpContext

O HttpContext associado à solicitação atual.

route
IRouter

O roteador ao qual essa restrição pertence.

routeDirection
RouteDirection

Indica se a restrição marcar é executada quando a solicitação de entrada é tratada ou quando uma URL é gerada.

Retornos

true se todos os valores de rota corresponderem às restrições.

Aplica-se a