ConfigDictionary.get

Get values from the configuration using config path notation.

  1. string get(string configPath)
    class ConfigDictionary
    string
    get
    (
    string configPath
    )
  2. ConvertToType get(string configPath)

Parameters

configPath string

Path to the wanted config value. The path is separated by dots, e.g. "server.public.hostname". Values from arrays can be selected by brackets, for example: "server[3].hostname.ports[0]". When the config is just a value, for example just a string, it can be fetched by just specifying "." as path. Although the path should be universally the same over all types of config files, some might not lend to this structure, and have a more specific way of retrieving data from the config. See the examples and specific config factories for more details.

Return Value

Type: string

The value at the path in the configuration. To convert it use get!T().

Meta