ProducesResponseTypeAttribute Klasse

Definition

Ein Filter, der den Typ des Werts und status von der Aktion zurückgegebenen Code angibt.

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
Vererbung
ProducesResponseTypeAttribute
Abgeleitet
Attribute
Implementiert

Konstruktoren

ProducesResponseTypeAttribute(Int32)

Initialisiert eine Instanz von ProducesResponseTypeAttribute.

ProducesResponseTypeAttribute(Type, Int32)

Initialisiert eine Instanz von ProducesResponseTypeAttribute.

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

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: