RequiredRouteConstraint 类

定义

约束必须具有值的路由参数。

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

注解

此约束主要用于强制在 URL 生成期间存在非参数值。

构造函数

RequiredRouteConstraint()

约束必须具有值的路由参数。

方法

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

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

适用于