ProducesResponseTypeAttribute Classe

Definizione

Filtro che specifica il tipo del valore e del codice di stato restituito dall'azione.

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
Ereditarietà
ProducesResponseTypeAttribute
Derivato
Attributi
Implementazioni

Costruttori

ProducesResponseTypeAttribute(Int32)

Inizializza un'istanza di ProducesResponseTypeAttribute.

ProducesResponseTypeAttribute(Type, Int32)

Inizializza un'istanza di ProducesResponseTypeAttribute.

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

Inizializza un'istanza di ProducesResponseTypeAttribute.

Proprietà

StatusCode

Ottiene o imposta il codice di stato HTTP della risposta.

Type

Ottiene o imposta il tipo del valore restituito da un'azione.

Implementazioni dell'interfaccia esplicita

IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection)

Configura una raccolta di tipi di contenuto consentiti che possono essere prodotti dall'azione.

Si applica a