Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CommandProfiles

Profiles map created by the command profile loader and passed to the handler via parameters. Handlers can retreive loaded profiles from the map via the profile type.

export

Hierarchy

  • CommandProfiles

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Private mMap

mMap: Map<string, IProfile[]>

The loaded profiles map - profiles are retrieved via the type key. More than one profile of a particular type can be loaded by the command processor (depending on dependencies, etc.)

memberof

CommandProfiles

Private mMetaMap

mMetaMap: Map<string, IProfileLoaded[]> = new Map<string, IProfileLoaded[]>()

The loaded profiles map with meta info - profiles are retrieved via the type key. More than one profile of a particular type can be loaded by the command processor (depending on dependencies, etc.)

memberof

CommandProfiles

Accessors

Private map

Private metaMap

Methods

Private addMeta

Private fail

  • fail(type: string): void

get

  • get<T>(type: string, failNotFound?: boolean, name?: string): T
  • Gets the first (or by name) profile in the map - automatically throws an exception (unless disabled)

    deprecated

    Load profile properties from IHandlerParameters.arguments property instead.

    memberof

    CommandProfiles

    Type parameters

    • T: IProfile

      The expected profile mapping to be returned

    Parameters

    • type: string

      The profile type

    • Default value failNotFound: boolean = true
    • Default value name: string = ""

    Returns T

    • The first profile in the map (or the one located by name)

getAll

  • getAll<T>(type: string, failNotFound?: boolean): T[]

getMeta

  • getMeta<T>(type: string, failNotFound?: boolean, name?: string): T
  • Gets the first (or by name) meta profile in the map - automatically throws an exception (unless disabled)

    deprecated
    memberof

    CommandProfiles

    Type parameters

    Parameters

    • type: string

      The profile type

    • Default value failNotFound: boolean = true
    • Default value name: string = ""

    Returns T

    • The first profile in the map (or the one located by name)

Generated using TypeDoc