Aracılığıyla paylaş


ProducesDefaultResponseTypeAttribute Sınıf

Tanım

tarafından ProducesResponseTypeAttributekapsanmayan Type tüm HTTP durum kodları için öğesini belirten bir filtre.

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
Devralma
ProducesDefaultResponseTypeAttribute
Öznitelikler
Uygulamalar

Oluşturucular

ProducesDefaultResponseTypeAttribute()

bir örneğini ProducesResponseTypeAttributebaşlatır.

ProducesDefaultResponseTypeAttribute(Type)

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