Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CommandExecutor

提供命令注册与执行的实现。

class
version

1.0.0

Hierarchy

  • CommandExecutor

Implements

Index

Constructors

constructor

Properties

Private _commands

Private _parser

Static Private _default

_default: CommandExecutor

Accessors

Static default

Methods

Protected createCommandContext

Protected createExecutorContext

execute

  • execute(commandText: string, parameter?: any): Promise<any>
  • 执行命令。

    summary

    暂不支持表达式,commandText 仅为命令路径。

    async

    Parameters

    • commandText: string

      指定要执行的命令表达式文本。

    • Default value parameter: any = null

      指定的输入参数。

    Returns Promise<any>

    any 返回命令执行的结果。

Protected executeCommand

find

Protected onExecute

Protected onParse

register

  • register(path: string, command: ICommand): void
  • 注册一个命令。 注意: 如果路径已存在,则会抛出一个异常。

    Parameters

    • path: string

      命令路径。

    • command: ICommand

      命令实例。

    Returns void

    void

remove

  • remove(path: string): boolean

Generated using TypeDoc