ControllerActionDescriptor 类

定义

控制器操作的描述符。

C#
public class ControllerActionDescriptor : Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor
继承
ControllerActionDescriptor

构造函数

ControllerActionDescriptor()

控制器操作的描述符。

属性

ActionConstraints

此操作的约束集。 必须满足所有条件才能选择操作。

(继承自 ActionDescriptor)
ActionName

操作的名称。

AttributeRouteInfo

获取或设置 AttributeRouteInfo

(继承自 ActionDescriptor)
BoundProperties

模型绑定的属性集。

(继承自 ActionDescriptor)
ControllerName

控制器的名称。

ControllerTypeInfo

TypeInfo控制器的 。

DisplayName

此操作的友好名称。

EndpointMetadata

获取或设置此操作的终结点元数据。 此 API 适用于基础结构,不应由应用程序代码使用。

(继承自 ActionDescriptor)
FilterDescriptors

与此操作关联的筛选器集。

(继承自 ActionDescriptor)
Id

获取唯一标识操作的 ID。

(继承自 ActionDescriptor)
MethodInfo

MethodInfo

Parameters

与此操作关联的参数集。

(继承自 ActionDescriptor)
Properties

存储与 ActionDescriptor关联的任意元数据属性。

(继承自 ActionDescriptor)
RouteValues

获取或设置路由值的集合,这些值必须由路由提供才能选择操作。

(继承自 ActionDescriptor)

扩展方法

GetProperty<T>(ActionDescriptor)

使用 提供的 值作为键,从 Properties 集合中获取属性的值 T

SetProperty<T>(ActionDescriptor, T)

使用 提供的 值作为键设置集合中 Properties 属性的值 T

适用于

产品 版本
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