Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CommandCollection

表示一个命令容器,用户存储命令使用。

class
description

该类为临时过度方案,后续将会替换为命令树的形式进行存储。

version

1.0.0

Hierarchy

  • CommandCollection

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Private _items

_items: Map<string, ICommand>

Accessors

size

  • get size(): number

Methods

add

  • add(path: string, command: ICommand): void
  • 将一个命令实例挂载至指定的的路径。

    summary

    如果指定的路径已存在命令将会抛出异常。

    Parameters

    • path: string

      路径字符串。

    • command: ICommand

      命令。

    Returns void

    void

contains

  • contains(path: string): boolean

find

forEach

  • forEach(callback: function, scope?: any): void

getEnumerator

remove

  • remove(path: string): boolean

Generated using TypeDoc