Sprache

ApiControllerAttribute Klasse

Definition

Gibt an, dass ein Typ und alle abgeleiteten Typen verwendet werden, um HTTP-API-Antworten zu verarbeiten.

Controller, die mit diesem Attribut versehen sind, sind mit Features und Verhalten konfiguriert, die darauf abzielen, die Entwicklerfreundlichkeit beim Erstellen von APIs zu verbessern.

Bei der Einrichtung einer Assembly werden alle Controller in der Assembly als Controller mit API-Verhalten behandelt. Weitere Informationen finden Sie unter ApiController-Attribut.

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.Assembly | System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
public class ApiControllerAttribute : Microsoft.AspNetCore.Mvc.ControllerAttribute, Microsoft.AspNetCore.Http.Metadata.IDisableCookieRedirectMetadata, 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.Assembly | System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)>]
type ApiControllerAttribute = class
    inherit ControllerAttribute
    interface IApiBehaviorMetadata
    interface IFilterMetadata
    interface IDisableCookieRedirectMetadata
[<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, IDisableCookieRedirectMetadata, IFilterMetadata
Public Class ApiControllerAttribute
Inherits ControllerAttribute
Implements IApiBehaviorMetadata, IFilterMetadata
Public Class ApiControllerAttribute
Inherits ControllerAttribute
Implements IFilterMetadata
Vererbung
ApiControllerAttribute
Attribute
Implementiert
IDisableCookieRedirectMetadata IFilterMetadata IApiBehaviorMetadata Microsoft.AspNetCore.Mvc.Internal.IApiBehaviorMetadata

Hinweise

Weitere Informationen finden Sie unter Cookie Policy Middleware.

Konstruktoren

Name Beschreibung
ApiControllerAttribute()

Gibt an, dass ein Typ und alle abgeleiteten Typen verwendet werden, um HTTP-API-Antworten zu verarbeiten.

Controller, die mit diesem Attribut versehen sind, sind mit Features und Verhalten konfiguriert, die darauf abzielen, die Entwicklerfreundlichkeit beim Erstellen von APIs zu verbessern.

Bei der Einrichtung einer Assembly werden alle Controller in der Assembly als Controller mit API-Verhalten behandelt. Weitere Informationen finden Sie unter ApiController-Attribut.

Gilt für: