Skip to content
Colin Scott edited this page Aug 24, 2014 · 1 revision

There are two separate implementations of the LightBlue APIs. The Hosted implementation is a wrapper around the Azure APIs and as such will behave the same as using the APIs directly. The Standalone implementation are an alternate implementation of the APIs that operate against local system resources.

Configuring The Mode

In most circumstances the mode is determined by how a role is started. Starting in a LightBlue host will automatically configure the mode to be Standalone. Starting in the Azure emulator or actual Azure sets the mode to Hosted. This happens automatically and developers do not need to call any configuration code to make it happen. The IoC registration functions will also pick up the correct mode and register things appropriately.

External Use

LightBlue supports using a subset of the APIs outside any kind of host. This is for use in tooling, scripts, LINQPad etc. When external to a host LightBlue must be configured prior to use. The is done by called LightBlueConfiguration.SetAsExternal(AzureEnvironment) passing in the environment that LightBlue should operate against. This must be done before accessing any LightBlue APIs and cannot be reconfigured once set.

When running externally the [settings](Settings API) and [local resources](Resources API) are not available. Attempting to retrieve a setting or local resource will result in an InvalidOperationException. These elements are role specific and are not relevant outside the context of a role. The full Storage API is available externally.

External code may use LightBlueContext for static access to the LightBlue APIs or use the IoC registration.

Clone this wiki locally