Skip to content

Settings API

Colin Scott edited this page Aug 24, 2014 · 3 revisions

The Settings API provides access to the role settings via the IAzureSettings interface. This interface has an indexer property that gives access to the settings. This uses a string index which is the setting key. Where the key does not exist a RoleEnvironmentException is thrown to maintain consistency with the Azure API.

When using the Hosted implementation of the LightBlue APIs IAzureSettings is a wrapper around RoleEnvironment.GetConfigurationSettingValue. When using the Standalone implementation the Azure configuration file specified to the host is parsed to locate the values. The role name provided to the host is used to determine which settings to extract from the file.

IAzureSettings is registered with the IoC container (when used) and is also available statically from the LightBlueContext.AzureSettings property.

Clone this wiki locally