ProducesResponseTypeAttribute Classe

Définition

Filtre qui spécifie le type de la valeur et status code retournés par l’action.

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
Héritage
ProducesResponseTypeAttribute
Dérivé
Attributs
Implémente

Constructeurs

ProducesResponseTypeAttribute(Int32)

Initialise une instance de ProducesResponseTypeAttribute.

ProducesResponseTypeAttribute(Type, Int32)

Initialise une instance de ProducesResponseTypeAttribute.

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

Initialise une instance de ProducesResponseTypeAttribute.

Propriétés

StatusCode

Obtient ou définit le code http status de la réponse.

Type

Obtient ou définit le type de la valeur retournée par une action.

Implémentations d’interfaces explicites

IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection)

Configure une collection de types de contenu autorisés qui peuvent être générés par l’action.

S’applique à