Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Excerpt

Gets a value from the engine app.config file by key name.


Code Block
public string GetEngineConfigSetting(string key);

Classes: Engine


Parameters

string key

Key of the config value.

Returns

string

String value from the config file.


Example

The following example demonstrates retrieving the CaptureAPI url from the executing engine app.config file.

Code Block
var captureApiUrl = Engine.GetEngineConfigSetting("CaptureApi");

Remarks

This method returns a null if no key is found that corresponds with the given parameter.

Although this method provides shorthand for retrieving conig values from the engine web.config file, the full configuration file is loaded in the executing app domain and can be accessed through other means such as the ConfigurationManager class in .NET framework.