ProducesResponseTypeAttribute Třída

Definice

Filtr, který určuje typ hodnoty a stavového kódu vráceného akcí.

public ref class ProducesResponseTypeAttribute : Attribute, Microsoft::AspNetCore::Mvc::ApiExplorer::IApiResponseMetadataProvider, Microsoft::AspNetCore::Mvc::Filters::IFilterMetadata
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)]
public class ProducesResponseTypeAttribute : Attribute, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)>]
type ProducesResponseTypeAttribute = class
    inherit Attribute
    interface IApiResponseMetadataProvider
    interface IFilterMetadata
Public Class ProducesResponseTypeAttribute
Inherits Attribute
Implements IApiResponseMetadataProvider, IFilterMetadata
Dědičnost
ProducesResponseTypeAttribute
Odvozené
Atributy
Implementuje

Konstruktory

ProducesResponseTypeAttribute(Int32)

Inicializuje instanci .ProducesResponseTypeAttribute

ProducesResponseTypeAttribute(Type, Int32)

Inicializuje instanci .ProducesResponseTypeAttribute

ProducesResponseTypeAttribute(Type, Int32, String, String[])

Inicializuje instanci .ProducesResponseTypeAttribute

Vlastnosti

StatusCode

Získá nebo nastaví stavový kód HTTP odpovědi.

Type

Získá nebo nastaví typ hodnoty vrácené akcí.

Explicitní implementace rozhraní

IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection)

Nakonfiguruje kolekci povolených typů obsahu, které může akce vytvořit.

Platí pro