HttpMethodRouteConstraint 类

定义

约束请求或路由的 HTTP 方法。

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

构造函数

HttpMethodRouteConstraint(String[])

创建接受 由 allowedMethods指定的 HTTP 方法的新实例HttpMethodRouteConstraint

属性

AllowedMethods

获取约束允许的 HTTP 方法。

方法

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

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

适用于