ApiControllerAttribute Klasa

Definicja

Wskazuje, że typ i wszystkie typy pochodne są używane do obsługi odpowiedzi interfejsu API HTTP.

Kontrolery ozdobione tym atrybutem są konfigurowane z funkcjami i zachowaniem ukierunkowanym na poprawę środowiska dewelopera na potrzeby tworzenia interfejsów API.

Podczas udekorowania zestawu wszystkie kontrolery w zestawie będą traktowane jako kontrolery z zachowaniem interfejsu API. Aby uzyskać więcej informacji, zobacz Atrybut 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
Dziedziczenie
ApiControllerAttribute
Atrybuty
Implementuje
IFilterMetadata Microsoft.AspNetCore.Mvc.Internal.IApiBehaviorMetadata IApiBehaviorMetadata

Uwagi

Aby uzyskać więcej informacji, zobacz Oprogramowanie pośredniczące zasad plików cookie.

Konstruktory

ApiControllerAttribute()

Wskazuje, że typ i wszystkie typy pochodne są używane do obsługi odpowiedzi interfejsu API HTTP.

Kontrolery ozdobione tym atrybutem są konfigurowane z funkcjami i zachowaniem ukierunkowanym na poprawę środowiska dewelopera na potrzeby tworzenia interfejsów API.

Podczas udekorowania zestawu wszystkie kontrolery w zestawie będą traktowane jako kontrolery z zachowaniem interfejsu API. Aby uzyskać więcej informacji, zobacz Atrybut ApiController.

Dotyczy