ConfigDictionary.get

Get values from the configuration and attempts to convert them to the specified type.

  1. string get(string configPath, string defaultValue)
  2. ConvertToType get(string configPath)
  3. ConvertToType get(string configPath, ConvertToType defaultValue)
    class ConfigDictionary
    ConvertToType
    get
    (
    ConvertToType
    )
    (
    string configPath
    ,
    ConvertToType defaultValue
    )

Parameters

configPath string

Path to the wanted config value. See get().

defaultValue ConvertToType

(Optional) Value to return when the given configPath is invalid. When not supplied a ConfigPathNotFoundException exception is thrown.

Return Value

Type: ConvertToType

The value at the path in the configuration.

Throws

ConfigReadException when something goes wrong reading the config. ConfigPathNotFoundException when the given path does not exist in the config.

See Also

get

Meta