ProducesResponseTypeAttribute Klasa

Definicja

Filtr określający typ wartości i kod stanu zwrócony przez akcję.

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
Dziedziczenie
ProducesResponseTypeAttribute
Pochodne
Atrybuty
Implementuje

Konstruktory

ProducesResponseTypeAttribute(Int32)

Inicjuje wystąpienie klasy ProducesResponseTypeAttribute.

ProducesResponseTypeAttribute(Type, Int32)

Inicjuje wystąpienie klasy ProducesResponseTypeAttribute.

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

Inicjuje wystąpienie klasy ProducesResponseTypeAttribute.

Właściwości

StatusCode

Pobiera lub ustawia kod stanu HTTP odpowiedzi.

Type

Pobiera lub ustawia typ wartości zwracanej przez akcję.

Jawne implementacje interfejsu

IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection)

Konfiguruje kolekcję dozwolonych typów zawartości, które mogą być generowane przez akcję.

Dotyczy