ProducesAttribute Třída
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Filtr, který určuje očekávanou Type hodnotu, kterou akce vrátí, a podporované typy obsahu odpovědi. Hodnota ContentTypes se používá k nastavení ContentTypes .
public ref class ProducesAttribute : Microsoft::AspNetCore::Mvc::Filters::ResultFilterAttribute, Microsoft::AspNetCore::Mvc::ApiExplorer::IApiResponseMetadataProvider
public ref class ProducesAttribute : Attribute, Microsoft::AspNetCore::Mvc::ApiExplorer::IApiResponseMetadataProvider, Microsoft::AspNetCore::Mvc::Filters::IOrderedFilter, Microsoft::AspNetCore::Mvc::Filters::IResultFilter
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class ProducesAttribute : Microsoft.AspNetCore.Mvc.Filters.ResultFilterAttribute, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class ProducesAttribute : Attribute, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IResultFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type ProducesAttribute = class
inherit ResultFilterAttribute
interface IApiResponseMetadataProvider
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type ProducesAttribute = class
inherit ResultFilterAttribute
interface IApiResponseMetadataProvider
interface IFilterMetadata
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type ProducesAttribute = class
inherit Attribute
interface IResultFilter
interface IFilterMetadata
interface IOrderedFilter
interface IApiResponseMetadataProvider
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type ProducesAttribute = class
inherit Attribute
interface IApiResponseMetadataProvider
interface IFilterMetadata
interface IOrderedFilter
interface IResultFilter
Public Class ProducesAttribute
Inherits ResultFilterAttribute
Implements IApiResponseMetadataProvider
Public Class ProducesAttribute
Inherits Attribute
Implements IApiResponseMetadataProvider, IOrderedFilter, IResultFilter
- Dědičnost
- Dědičnost
-
ProducesAttribute
- Atributy
- Implementuje
Konstruktory
ProducesAttribute(String, String[]) |
Inicializuje instanci s ProducesAttribute povolenými typy obsahu. |
ProducesAttribute(Type) |
Inicializuje instanci ProducesAttribute . |
Vlastnosti
ContentTypes |
Získá nebo nastaví podporované typy obsahu odpovědi. Slouží k nastavení ContentTypes . |
Order |
Získá hodnotu objednávky pro určení pořadí provádění filtrů. Filtry se spouštějí ve vzestupné číselné hodnotě Order Vlastnosti. |
Order |
Získá hodnotu objednávky pro určení pořadí provádění filtrů. Filtry se spouštějí ve vzestupné číselné hodnotě Order Vlastnosti. (Zděděno od ResultFilterAttribute) |
StatusCode |
Získá stavový kód HTTP odpovědi. |
Type |
Získá optimistický návratový typ akce. |
Metody
OnResultExecuted(ResultExecutedContext) |
Volá se po provedení výsledku akce. |
OnResultExecuted(ResultExecutedContext) |
Volá se po provedení výsledku akce. (Zděděno od ResultFilterAttribute) |
OnResultExecuting(ResultExecutingContext) |
Volá se před provedením výsledku akce. |
OnResultExecutionAsync(ResultExecutingContext, ResultExecutionDelegate) |
Volá se asynchronně před výsledkem akce. (Zděděno od ResultFilterAttribute) |
SetContentTypes(MediaTypeCollection) |
Nakonfiguruje kolekci povolených typů obsahu, které může tato akce vytvořit. |