ApiControllerAttribute Kelas

Definisi

Menunjukkan bahwa jenis dan semua jenis turunan digunakan untuk melayani respons API HTTP.

Pengontrol yang didekorasi dengan atribut ini dikonfigurasi dengan fitur dan perilaku yang ditargetkan untuk meningkatkan pengalaman pengembang untuk membangun API.

Ketika dihiasi pada perakitan, semua pengontrol di perakitan akan diperlakukan sebagai pengontrol dengan perilaku API. Untuk informasi selengkapnya, lihat atribut ApiController.

public ref class ApiControllerAttribute : Microsoft::AspNetCore::Mvc::ControllerAttribute, Microsoft::AspNetCore::Mvc::Filters::IFilterMetadata, Microsoft::AspNetCore::Mvc::Internal::IApiBehaviorMetadata
public ref class ApiControllerAttribute : Microsoft::AspNetCore::Mvc::ControllerAttribute, Microsoft::AspNetCore::Mvc::Filters::IFilterMetadata
public ref class ApiControllerAttribute : Microsoft::AspNetCore::Mvc::ControllerAttribute, Microsoft::AspNetCore::Mvc::Filters::IFilterMetadata, Microsoft::AspNetCore::Mvc::Infrastructure::IApiBehaviorMetadata
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
public class ApiControllerAttribute : Microsoft.AspNetCore.Mvc.ControllerAttribute, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Internal.IApiBehaviorMetadata
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
public class ApiControllerAttribute : Microsoft.AspNetCore.Mvc.ControllerAttribute, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
public class ApiControllerAttribute : Microsoft.AspNetCore.Mvc.ControllerAttribute, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Infrastructure.IApiBehaviorMetadata
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)>]
type ApiControllerAttribute = class
    inherit ControllerAttribute
    interface IApiBehaviorMetadata
    interface IFilterMetadata
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)>]
type ApiControllerAttribute = class
    inherit ControllerAttribute
    interface IFilterMetadata
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)>]
type ApiControllerAttribute = class
    inherit ControllerAttribute
    interface IFilterMetadata
    interface IApiBehaviorMetadata
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)>]
type ApiControllerAttribute = class
    inherit ControllerAttribute
    interface IApiBehaviorMetadata
    interface IFilterMetadata
Public Class ApiControllerAttribute
Inherits ControllerAttribute
Implements IApiBehaviorMetadata, IFilterMetadata
Public Class ApiControllerAttribute
Inherits ControllerAttribute
Implements IFilterMetadata
Warisan
ApiControllerAttribute
Atribut
Penerapan
IFilterMetadata Microsoft.AspNetCore.Mvc.Internal.IApiBehaviorMetadata IApiBehaviorMetadata

Keterangan

Untuk informasi selengkapnya, lihat Middleware kebijakan cookie.

Konstruktor

ApiControllerAttribute()

Menunjukkan bahwa jenis dan semua jenis turunan digunakan untuk melayani respons API HTTP.

Pengontrol yang didekorasi dengan atribut ini dikonfigurasi dengan fitur dan perilaku yang ditargetkan untuk meningkatkan pengalaman pengembang untuk membangun API.

Ketika dihiasi pada perakitan, semua pengontrol di perakitan akan diperlakukan sebagai pengontrol dengan perilaku API. Untuk informasi selengkapnya, lihat atribut ApiController.

Berlaku untuk