ProducesResponseTypeAttribute<T> 類別

定義

指定動作所傳回之值和狀態碼類型的篩選。

public class ProducesResponseTypeAttribute<T> : Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute
type ProducesResponseTypeAttribute<'T> = class
    inherit ProducesResponseTypeAttribute
Public Class ProducesResponseTypeAttribute(Of T)
Inherits ProducesResponseTypeAttribute

類型參數

T

Type要在回應中寫入之 物件的 。

繼承
ProducesResponseTypeAttribute<T>

建構函式

ProducesResponseTypeAttribute<T>(Int32)

初始化 ProducesResponseTypeAttribute 的執行個體。

ProducesResponseTypeAttribute<T>(Int32, String, String[])

初始化 ProducesResponseTypeAttribute 的執行個體。

屬性

StatusCode

取得或設定回應的 HTTP 狀態碼。

(繼承來源 ProducesResponseTypeAttribute)
Type

取得或設定動作所傳回之值的型別。

(繼承來源 ProducesResponseTypeAttribute)

明確介面實作

IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection)

設定允許的內容類型集合,這些內容類型可由動作產生。

(繼承來源 ProducesResponseTypeAttribute)

適用於