ControllerAttribute 类
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指示默认控制器发现机制将应用此属性的类型和任何派生类型视为控制器,除非 NonControllerAttribute 应用于层次结构中的任何类型。
public ref class ControllerAttribute : Attribute
C#
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
public class ControllerAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)>]
type ControllerAttribute = class
inherit Attribute
Public Class ControllerAttribute
Inherits Attribute
- 继承
-
ControllerAttribute
- 派生
- 属性
Controller |
指示默认控制器发现机制将应用此属性的类型和任何派生类型视为控制器,除非 NonControllerAttribute 应用于层次结构中的任何类型。 |
产品 | 版本 |
---|---|
ASP.NET Core | 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |