ProducesDefaultResponseTypeAttribute Classe

Définition

Filtre qui spécifie le Type pour tous les codes status HTTP qui ne sont pas couverts par ProducesResponseTypeAttribute.

public ref class ProducesDefaultResponseTypeAttribute sealed : Attribute, Microsoft::AspNetCore::Mvc::ApiExplorer::IApiDefaultResponseMetadataProvider, Microsoft::AspNetCore::Mvc::Filters::IFilterMetadata
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public sealed class ProducesDefaultResponseTypeAttribute : Attribute, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDefaultResponseMetadataProvider, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type ProducesDefaultResponseTypeAttribute = class
    inherit Attribute
    interface IApiDefaultResponseMetadataProvider
    interface IApiResponseMetadataProvider
    interface IFilterMetadata
Public NotInheritable Class ProducesDefaultResponseTypeAttribute
Inherits Attribute
Implements IApiDefaultResponseMetadataProvider, IFilterMetadata
Héritage
ProducesDefaultResponseTypeAttribute
Attributs
Implémente

Constructeurs

ProducesDefaultResponseTypeAttribute()

Initialise une instance de ProducesResponseTypeAttribute.

ProducesDefaultResponseTypeAttribute(Type)

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 à