ProducesAttribute 构造函数

定义

重载

ProducesAttribute(Type)

初始化 ProducesAttribute 的实例。

ProducesAttribute(String, String[])

使用允许的内容类型初始化 的 ProducesAttribute 实例。

ProducesAttribute(Type)

初始化 ProducesAttribute 的实例。

public:
 ProducesAttribute(Type ^ type);
public ProducesAttribute (Type type);
new Microsoft.AspNetCore.Mvc.ProducesAttribute : Type -> Microsoft.AspNetCore.Mvc.ProducesAttribute
Public Sub New (type As Type)

参数

type
Type

Type要在响应中写入的 对象的 。

适用于

ProducesAttribute(String, String[])

使用允许的内容类型初始化 的 ProducesAttribute 实例。

public:
 ProducesAttribute(System::String ^ contentType, ... cli::array <System::String ^> ^ additionalContentTypes);
public ProducesAttribute (string contentType, params string[] additionalContentTypes);
new Microsoft.AspNetCore.Mvc.ProducesAttribute : string * string[] -> Microsoft.AspNetCore.Mvc.ProducesAttribute
Public Sub New (contentType As String, ParamArray additionalContentTypes As String())

参数

contentType
String

响应允许的内容类型。

additionalContentTypes
String[]

响应的其他允许内容类型。

适用于