ProducesResponseTypeAttribute Sınıf

Tanım

Eylem tarafından döndürülen değer ve durum kodunun türünü belirten bir filtre.

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
Devralma
ProducesResponseTypeAttribute
Türetilmiş
Öznitelikler
Uygulamalar

Oluşturucular

ProducesResponseTypeAttribute(Int32)

bir örneğini ProducesResponseTypeAttributebaşlatır.

ProducesResponseTypeAttribute(Type, Int32)

bir örneğini ProducesResponseTypeAttributebaşlatır.

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

bir örneğini ProducesResponseTypeAttributebaşlatır.

Özellikler

StatusCode

Yanıtın HTTP durum kodunu alır veya ayarlar.

Type

Bir eylem tarafından döndürülen değerin türünü alır veya ayarlar.

Belirtik Arabirim Kullanımları

IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection)

eylem tarafından üretilebilen izin verilen içerik türlerinden oluşan bir koleksiyon yapılandırılır.

Şunlara uygulanır