ProducesResponseTypeAttribute 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ProducesResponseTypeAttribute(Int32)
初始化 ProducesResponseTypeAttribute 的執行個體。
public:
ProducesResponseTypeAttribute(int statusCode);
public ProducesResponseTypeAttribute (int statusCode);
new Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute : int -> Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute
Public Sub New (statusCode As Integer)
參數
- statusCode
- Int32
HTTP 回應狀態碼。
適用於
ProducesResponseTypeAttribute(Type, Int32)
初始化 ProducesResponseTypeAttribute 的執行個體。
public:
ProducesResponseTypeAttribute(Type ^ type, int statusCode);
public ProducesResponseTypeAttribute (Type type, int statusCode);
new Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute : Type * int -> Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute
Public Sub New (type As Type, statusCode As Integer)
參數
- statusCode
- Int32
HTTP 回應狀態碼。
適用於
ProducesResponseTypeAttribute(Type, Int32, String, String[])
初始化 ProducesResponseTypeAttribute 的執行個體。
public ProducesResponseTypeAttribute (Type type, int statusCode, string contentType, params string[] additionalContentTypes);
new Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute : Type * int * string * string[] -> Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute
Public Sub New (type As Type, statusCode As Integer, contentType As String, ParamArray additionalContentTypes As String())
參數
- statusCode
- Int32
HTTP 回應狀態碼。
- contentType
- String
與回應相關聯的內容類型。
- additionalContentTypes
- String[]
回應支援的其他內容類型。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應