ProducesDefaultResponseTypeAttribute Třída

Definice

Filtr, který určuje Type pro všechny stavové kódy HTTP, na které se nevztahuje 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
Dědičnost
ProducesDefaultResponseTypeAttribute
Atributy
Implementuje

Konstruktory

ProducesDefaultResponseTypeAttribute()

Inicializuje instanci .ProducesResponseTypeAttribute

ProducesDefaultResponseTypeAttribute(Type)

Inicializuje instanci .ProducesResponseTypeAttribute

Vlastnosti

StatusCode

Získá nebo nastaví stavový kód HTTP odpovědi.

Type

Získá nebo nastaví typ hodnoty vrácené akcí.

Explicitní implementace rozhraní

IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection)

Nakonfiguruje kolekci povolených typů obsahu, které může akce vytvořit.

Platí pro