RegexRouteConstraint 类

定义

约束某个路由参数以匹配正则表达式。

public ref class RegexRouteConstraint : Microsoft::AspNetCore::Routing::IRouteConstraint
public class RegexRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint
public class RegexRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.Matching.IParameterLiteralNodeMatchingPolicy
type RegexRouteConstraint = class
    interface IRouteConstraint
type RegexRouteConstraint = class
    interface IRouteConstraint
    interface IParameterPolicy
type RegexRouteConstraint = class
    interface IParameterPolicy
    interface IRouteConstraint
type RegexRouteConstraint = class
    interface IRouteConstraint
    interface IParameterPolicy
    interface IParameterLiteralNodeMatchingPolicy
Public Class RegexRouteConstraint
Implements IRouteConstraint
Public Class RegexRouteConstraint
Implements IParameterLiteralNodeMatchingPolicy, IRouteConstraint
继承
RegexRouteConstraint
派生
实现

构造函数

RegexRouteConstraint(Regex)

给定 regexRegexRouteConstraint构造函数。

RegexRouteConstraint(String)

给定 regexPatternRegexRouteConstraint构造函数。

属性

Constraint

获取路由约束中使用的正则表达式。

方法

Match(HttpContext, IRouter, String, RouteValueDictionary, RouteDirection)

确定 URL 参数是否包含此约束的有效值。

显式接口实现

IParameterLiteralNodeMatchingPolicy.MatchesLiteral(String, String)

约束某个路由参数以匹配正则表达式。

适用于