Skip to content

Instantly share code, notes, and snippets.

@bithavoc
Created January 12, 2014 21:22
Show Gist options
  • Select an option

  • Save bithavoc/8390750 to your computer and use it in GitHub Desktop.

Select an option

Save bithavoc/8390750 to your computer and use it in GitHub Desktop.
determinate if running in azure fabric, emulated or not
using Microsoft.WindowsAzure.ServiceRuntime; // Microsoft.WindowsAzure.ServiceRuntime.dll
...
if (RoleEnvironment.IsAvailable) {
// running inside Azure Fabric
if(RoleEnvironment.IsEmulated) {
// Fabric is running in Emulator
} else {
// Fabric is running in Azure Cloud
}
} else {
// not runninig in Azure Fabric
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment