Share via


ProducesAttribute 建構函式

定義

多載

ProducesAttribute(Type)

初始化 ProducesAttribute 的執行個體。

ProducesAttribute(String, String[])

使用允許的內容類型,初始化 的 ProducesAttribute 實例。

ProducesAttribute(Type)

來源:
ProducesAttribute.cs
來源:
ProducesAttribute.cs

初始化 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.cs
來源:
ProducesAttribute.cs

使用允許的內容類型,初始化 的 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[]

回應的其他允許內容類型。

適用於