Configuration class loads the required external setup variables to launch the Lean engine.
More...
|
static void | SetConfigurationFile (string fileName) |
| Set configuration file on-fly More...
|
|
static void | MergeCommandLineArgumentsWithConfiguration (Dictionary< string, object > cliArguments) |
| Merge CLI arguments with configuration file + load custom config file via CLI arg More...
|
|
static void | Reset () |
| Resets the config settings to their default values. Called in regression tests where multiple algorithms are run sequentially, and we need to guarantee that every test starts with the same configuration. More...
|
|
static string | GetEnvironment () |
| Gets the currently selected environment. If sub-environments are defined, they'll be returned as {env1}.{env2} More...
|
|
static string | Get (string key, string defaultValue="") |
| Get the matching config setting from the file searching for this key. More...
|
|
static JToken | GetToken (string key) |
| Gets the underlying JToken for the specified key More...
|
|
static void | Set (string key, dynamic value) |
| Sets a configuration value. This is really only used to help testing. The key heye can be specified as {environment}.key to set a value on a specific environment More...
|
|
static bool | GetBool (string key, bool defaultValue=false) |
| Get a boolean value configuration setting by a configuration key. More...
|
|
static int | GetInt (string key, int defaultValue=0) |
| Get the int value of a config string. More...
|
|
static double | GetDouble (string key, double defaultValue=0.0) |
| Get the double value of a config string. More...
|
|
static T | GetValue< T > (string key, T defaultValue=default(T)) |
| Gets a value from configuration and converts it to the requested type, assigning a default if the configuration is null or empty More...
|
|
static bool | TryGetValue< T > (string key, out T value) |
| Tries to find the specified key and parse it as a T, using default(T) if unable to locate the key or unable to parse it More...
|
|
static bool | TryGetValue< T > (string key, T defaultValue, out T value) |
| Tries to find the specified key and parse it as a T, using defaultValue if unable to locate the key or unable to parse it More...
|
|
static void | Write (string targetPath=null) |
| Write the contents of the serialized configuration back to the disk. More...
|
|
static JObject | Flatten (string overrideEnvironment) |
| Flattens the jobject with respect to the selected environment and then removes the 'environments' node More...
|
|
static JObject | Flatten (JObject config, string overrideEnvironment) |
| Flattens the jobject with respect to the selected environment and then removes the 'environments' node More...
|
|
Configuration class loads the required external setup variables to launch the Lean engine.
Definition at line 31 of file Config.cs.