共用方式為


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)

限制路由參數只包含指定的字串。

適用於