StringRouteConstraint 类

定义

将路由参数约束为仅包含指定的字符串。

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

构造函数

StringRouteConstraint(String)

初始化 StringRouteConstraint 类的新实例。

方法

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

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

显式接口实现

IParameterLiteralNodeMatchingPolicy.MatchesLiteral(String, String)

将路由参数约束为仅包含指定的字符串。

适用于