Méthode | Description | |
---|---|---|
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
|
Méthode | Description | |
---|---|---|
JsonEncompassConfig ( string configText ) : System |
public GetConfigGroup ( string key ) : IEncompassConfig | ||
key | string | Json key of the section you want. |
Résultat | 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 |
Résultat | 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 |
Résultat | string |
public Init ( Session session ) : bool | ||
session | Session | Current Encompass session |
Résultat | bool |
public Init ( Session session, string configPath ) : bool | ||
session | Session | Current Encompass session |
configPath | string | Name of the config file (e.g. "myconfig.json") |
Résultat | 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. | |
Résultat | bool |
public Init ( string configAsString ) : bool | ||
configAsString | string | The json string |
Résultat | bool |
public Reload ( Session session ) : bool | ||
session | Session | Current Encompass session |
Résultat | bool |
public Reload ( Session session, string configPath ) : bool | ||
session | Session | Current Encompass session |
configPath | string | Name of the config file e.g. "foo.json" |
Résultat | bool |