HttpMethodActionConstraint 类   
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
的实现 IActionConstraint ,用于在 MVC 与旧版 IRouter 支持一起使用时强制实施 HTTP 方法筛选。 HttpMethodActionConstraint可用于确定操作支持的 HTTP 方法集。
public ref class HttpMethodActionConstraint : Microsoft::AspNetCore::Mvc::ActionConstraints::IActionConstraintpublic class HttpMethodActionConstraint : Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstrainttype HttpMethodActionConstraint = class
    interface IActionConstraint
    interface IActionConstraintMetadataPublic Class HttpMethodActionConstraint
Implements IActionConstraint- 继承
- 
				HttpMethodActionConstraint
- 实现
构造函数
| HttpMethodActionConstraint(IEnumerable<String>) | 创建 HttpMethodActionConstraint 的新实例。 | 
字段
| HttpMethodConstraintOrder | 
属性
| HttpMethods | 获取允许的 HTTP 方法的列表。 如果允许所有 HTTP 方法,将返回空列表。 | 
| Order | 约束顺序。 | 
方法
| Accept(ActionConstraintContext) | 确定操作是否是有效的选择候选项。 |