RouteConstraintMatcher.Match 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
确定是否 routeValues
与提供的 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
参数
- constraints
- IDictionary<String,IRouteConstraint>
路由的约束。
- routeValues
- RouteValueDictionary
从匹配的路由中提取的路由参数值。
- httpContext
- HttpContext
与 HttpContext 当前请求关联的 。
- route
- IRouter
此约束所属的路由器。
- routeDirection
- RouteDirection
指示是在处理传入请求时还是生成 URL 时执行约束检查。
- logger
- ILogger
返回
true
如果所有路由值都与其约束匹配,则为 。