ProducesResponseTypeAttribute Kelas
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Filter yang menentukan jenis nilai dan kode status yang dikembalikan oleh tindakan.
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
- Warisan
-
ProducesResponseTypeAttribute
- Turunan
- Atribut
- Penerapan
Konstruktor
ProducesResponseTypeAttribute(Int32) |
Menginisialisasi instans ProducesResponseTypeAttribute. |
ProducesResponseTypeAttribute(Type, Int32) |
Menginisialisasi instans ProducesResponseTypeAttribute. |
ProducesResponseTypeAttribute(Type, Int32, String, String[]) |
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
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk