Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CommandContext

命令在执行器过程中使用的上下文参数。

class
version

1.0.0

Hierarchy

  • CommandContext

Index

Constructors

constructor

  • 初始化执行命令上下文的新实例。

    constructor

    Parameters

    • executor: ICommandExecutor

      执行命令所在的命令执行器。

    • expression: CommandExpression

      命令对应的表达式。

    • command: ICommand

      执行的命令对象。

    • parameter: any

      命令执行的传入参数。

    • Default value extendedProperties: Map<string, any> = null

      在本次执行过程中在各处理模块之间组织和共享数据的键/值集合。

    Returns CommandContext

Properties

Private _command

_command: ICommand

Private _executor

_executor: ICommandExecutor

Private _expression

_expression: CommandExpression

Private _extendedProperties

_extendedProperties: Map<string, any>

Private _parameter

_parameter: any

Accessors

command

executor

expression

extendedProperties

  • get extendedProperties(): Map<string, any>
  • 获取可用于在本次执行过程中在各处理模块之间组织和共享数据的键/值集合。

    property

    Returns Map<string, any>

    Map

hasExtendedProperties

  • get hasExtendedProperties(): boolean
  • 获取扩展属性集是否有内容。 在不确定扩展属性集是否含有内容之前,建议先使用该属性来检测。

    property

    Returns boolean

    boolean

parameter

  • get parameter(): any

Generated using TypeDoc