Share via


HttpMethodMetadata 构造函数

定义

重载

HttpMethodMetadata(IEnumerable<String>)

初始化 HttpMethodMetadata 类的新实例。

HttpMethodMetadata(IEnumerable<String>, Boolean)

初始化 HttpMethodMetadata 类的新实例。

HttpMethodMetadata(IEnumerable<String>)

Source:
HttpMethodMetadata.cs

初始化 HttpMethodMetadata 类的新实例。

public:
 HttpMethodMetadata(System::Collections::Generic::IEnumerable<System::String ^> ^ httpMethods);
public HttpMethodMetadata (System.Collections.Generic.IEnumerable<string> httpMethods);
new Microsoft.AspNetCore.Routing.HttpMethodMetadata : seq<string> -> Microsoft.AspNetCore.Routing.HttpMethodMetadata
Public Sub New (httpMethods As IEnumerable(Of String))

参数

httpMethods
IEnumerable<String>

路由期间使用的 HTTP 方法。 空集合意味着将接受任何 HTTP 方法。

适用于

HttpMethodMetadata(IEnumerable<String>, Boolean)

Source:
HttpMethodMetadata.cs

初始化 HttpMethodMetadata 类的新实例。

public:
 HttpMethodMetadata(System::Collections::Generic::IEnumerable<System::String ^> ^ httpMethods, bool acceptCorsPreflight);
public HttpMethodMetadata (System.Collections.Generic.IEnumerable<string> httpMethods, bool acceptCorsPreflight);
new Microsoft.AspNetCore.Routing.HttpMethodMetadata : seq<string> * bool -> Microsoft.AspNetCore.Routing.HttpMethodMetadata
Public Sub New (httpMethods As IEnumerable(Of String), acceptCorsPreflight As Boolean)

参数

httpMethods
IEnumerable<String>

路由期间使用的 HTTP 方法。 空集合意味着将接受任何 HTTP 方法。

acceptCorsPreflight
Boolean

一个 值,该值指示路由是否接受 CORS 预检请求。

适用于