ApiControllerAttribute Classe

Définition

Indique qu’un type et tous les types dérivés sont utilisés pour traiter les réponses de l’API HTTP.

Les contrôleurs décorés avec cet attribut sont configurés avec des fonctionnalités et un comportement visant à améliorer l’expérience des développeurs pour la création d’API.

Lorsqu’ils sont décorés sur un assembly, tous les contrôleurs de l’assembly sont traités comme des contrôleurs avec le comportement de l’API. Pour plus d’informations, consultez Attribut 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
Héritage
ApiControllerAttribute
Attributs
Implémente
IFilterMetadata Microsoft.AspNetCore.Mvc.Internal.IApiBehaviorMetadata IApiBehaviorMetadata

Remarques

Pour plus d’informations, consultez Intergiciel de stratégie de cookie.

Constructeurs

ApiControllerAttribute()

Indique qu’un type et tous les types dérivés sont utilisés pour traiter les réponses de l’API HTTP.

Les contrôleurs décorés avec cet attribut sont configurés avec des fonctionnalités et un comportement visant à améliorer l’expérience des développeurs pour la création d’API.

Lorsqu’ils sont décorés sur un assembly, tous les contrôleurs de l’assembly sont traités comme des contrôleurs avec le comportement de l’API. Pour plus d’informations, consultez Attribut ApiController.

S’applique à