ProducesDefaultResponseTypeAttribute Klasse

Definition

Ein Filter, der für Type alle HTTP-status-Codes angibt, die nicht von ProducesResponseTypeAttributeabgedeckt werden.

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
Vererbung
ProducesDefaultResponseTypeAttribute
Attribute
Implementiert

Konstruktoren

ProducesDefaultResponseTypeAttribute()

Initialisiert eine Instanz von ProducesResponseTypeAttribute.

ProducesDefaultResponseTypeAttribute(Type)

Initialisiert eine Instanz von ProducesResponseTypeAttribute.

Eigenschaften

StatusCode

Ruft den HTTP-status Code der Antwort ab oder legt diese fest.

Type

Ruft den Typ des von einer Aktion zurückgegebenen Werts ab oder legt diese fest.

Explizite Schnittstellenimplementierungen

IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection)

Konfiguriert eine Auflistung zulässiger Inhaltstypen, die von der Aktion erzeugt werden können.

Gilt für: