ProducesAttribute<T> クラス

定義

アクションが返す予期される Type 内容と、サポートされている応答コンテンツ タイプを指定するフィルター。 値は ContentTypes を設定 ContentTypesするために使用されます。

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

型パラメーター

T

Type応答で書き込まれるオブジェクトの 。

継承
ProducesAttribute<T>

注釈

これは、 の派生ジェネリック バリアント ProducesAttributeです。 ターゲットには、いずれかの属性のインスタンスが 1 つだけ指定されていることを確認します。

コンストラクター

ProducesAttribute<T>()

ProducesAttribute のインスタンスを初期化します。

プロパティ

ContentTypes

サポートされている応答コンテンツ タイプを取得または設定します。 を設定 ContentTypesするために使用されます。

(継承元 ProducesAttribute)
Order

フィルターの実行順序を決定するための順序値を取得します。 フィルターは、 プロパティの昇順の数値で Order 実行されます。

(継承元 ProducesAttribute)
StatusCode

応答の HTTP 状態コードを取得します。

(継承元 ProducesAttribute)
Type

アクションのオプティミスティック戻り値の型を取得します。

(継承元 ProducesAttribute)

メソッド

OnResultExecuted(ResultExecutedContext)

アクションの結果の実行後に呼び出されます。

(継承元 ProducesAttribute)
OnResultExecuting(ResultExecutingContext)

アクション結果の実行前に呼び出されます。

(継承元 ProducesAttribute)
SetContentTypes(MediaTypeCollection)

アクションによって生成できる許可されたコンテンツ タイプのコレクションを構成します。

(継承元 ProducesAttribute)

適用対象