Skip to content

LightBlueContext

Colin Scott edited this page Aug 23, 2014 · 1 revision

The LightBlueContext is the primary access point for static usage of the LightBlue APIs. It is intended for developers who do not wish to use IoC in their roles.

RoleName

The RoleName property gives access to the name of the current role, as determined by the current host. This will be RoleEnvironment.CurrentRoleInstance.Role.Name for roles running in actual or emulated Azure or the value of the -n command line parameter to the LightBlue host. For code running external to a host this will always return the value External.

AzureSettings

AzureSettings provides access to the Settings API. When running external to a host the implementation returned will throw InvalidOperationException for all settings lookups.

AzureLocalResources

AzureLocalResources provides access to the Resources API. When running external to a host the implementation returned will throw InvalidOperationException for all resources lookups.

AzureEnvironment

Indicates the environment that LightBlue is configured to use. When running external to a host will return the environment for which the external process has been configured.

AzureStorageFactory

Provides the factory method that creates an IAzureStorage instance given a connection string. This is the primary access point into the Storage API.

AzureBlobContainerFactory

Provides the factory method that creates an IAzureBlobContainer instance given the Uri of the container. (See Storage API)

AzureBlockBlobFactory

Provides the factory method that creates an IAzureBlockBlob instance given the Uri of the blob. (See Storage API)