Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ConfigService

This service allows the user to interact with application configuration.

Hierarchy

  • ConfigServiceBase
    • ConfigService

Index

Constructors

constructor

Properties

Protected hiddenProperties

hiddenProperties: Set<string> = new Set<string>(['rpcTransports'])

A set of properties that will not be sent to the user.

Protected readonlyProperties

readonlyProperties: Set<string> = new Set<string>(["cascadeClassifiers","rpcTransports","commandTypes"])

A set of properties that cannot be changed by the user.

Protected resources

resources: AppResources

Common application resources.

Methods

GetConfig

  • GetConfig(): Promise<any>
  • Retrieves all configuration values.

    Returns Promise<any>

GetConfigValue

  • GetConfigValue(key: string): Promise<any>
  • Retrieves a configuration value.

    Parameters

    • key: string

      Key of the value to retrieve.

    Returns Promise<any>

LoadConfig

  • LoadConfig(): Promise<void>
  • If a configuration file has been specified, loads changes from the config file.

    Returns Promise<void>

SaveConfig

  • SaveConfig(): Promise<void>
  • If a configuration file has been specified, writes changes to the config file.

    Returns Promise<void>

SetConfig

  • SetConfig(object: any, parentKey?: string | string[]): Promise<void>
  • Applies an object containing properties to the application configuration

    Parameters

    • object: any

      Object containing properties.

    • Optional parentKey: string | string[]

      Root property to apply changes to. Defaults to the root config object.

    Returns Promise<void>

SetConfigValue

  • SetConfigValue(key: string, value: any): Promise<void>
  • Sets a configuration value.

    Parameters

    • key: string

      Key of the value to set.

    • value: any

    Returns Promise<void>

Generated using TypeDoc