Bagikan melalui


ProducesDefaultResponseTypeAttribute Kelas

Definisi

Filter yang menentukan Type untuk semua kode status HTTP yang tidak dicakup oleh 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
Warisan
ProducesDefaultResponseTypeAttribute
Atribut
Penerapan

Konstruktor

ProducesDefaultResponseTypeAttribute()

Menginisialisasi instans ProducesResponseTypeAttribute.

ProducesDefaultResponseTypeAttribute(Type)

Menginisialisasi instans ProducesResponseTypeAttribute.

Properti

StatusCode

Mendapatkan atau mengatur kode status HTTP respons.

Type

Mendapatkan atau mengatur jenis nilai yang dikembalikan oleh tindakan.

Implementasi Antarmuka Eksplisit

IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection)

Mengonfigurasi kumpulan tipe isi yang diizinkan yang dapat dihasilkan oleh tindakan.

Berlaku untuk