Метод | Описание | |
---|---|---|
GetConfigGroup ( string key ) : IEncompassConfig |
Returns a sub-section of the config.
|
|
GetKeys ( ) : ICollection |
Returns all keys in the json config.
|
|
GetValue ( string key, bool defaultVal ) : bool |
Returns the value of the given key
|
|
GetValue ( string key, string defaultVal = null ) : string |
Returns the value of the given key
|
|
Init ( Session session ) : bool |
Initializes the config from a default "sextant.json" file.
|
|
Init ( Session session, string configPath ) : bool |
Initializes the config from this file.
|
|
Init ( Session session, string configPath, |
Initializes the config from this file.
|
|
Init ( string configAsString ) : bool |
Loads the config from the given string. Useful for testing.
|
|
JsonEncompassConfig ( ) : System |
Default constructor.
|
|
Reload ( Session session ) : bool |
Reloads the config from a default "sextant.json" file.
|
|
Reload ( Session session, string configPath ) : bool |
Reloads the config file
|
Метод | Описание | |
---|---|---|
JsonEncompassConfig ( string configText ) : System |
public GetConfigGroup ( string key ) : IEncompassConfig | ||
key | string | Json key of the section you want. |
Результат | IEncompassConfig |
public GetValue ( string key, bool defaultVal ) : bool | ||
key | string | Full path to the key(e.g. "MyKey" or "Keys[0].MySubKey") |
defaultVal | bool | Default value if the key is null |
Результат | bool |
public GetValue ( string key, string defaultVal = null ) : string | ||
key | string | Full path to the key(e.g. "MyKey" or "Keys[0].MySubKey") |
defaultVal | string | Default value if the key is null |
Результат | string |
public Init ( Session session ) : bool | ||
session | Session | Current Encompass session |
Результат | bool |
public Init ( Session session, string configPath ) : bool | ||
session | Session | Current Encompass session |
configPath | string | Name of the config file (e.g. "myconfig.json") |
Результат | bool |
public Init ( Session session, string configPath, |
||
session | Session | Current Encompass session |
configPath | string | Name of the config file (e.g. "myconfig.json") |
encoding | Encoding of the file. | |
Результат | bool |
public Init ( string configAsString ) : bool | ||
configAsString | string | The json string |
Результат | bool |
public Reload ( Session session ) : bool | ||
session | Session | Current Encompass session |
Результат | bool |
public Reload ( Session session, string configPath ) : bool | ||
session | Session | Current Encompass session |
configPath | string | Name of the config file e.g. "foo.json" |
Результат | bool |