Created
January 12, 2014 21:22
-
-
Save bithavoc/8390750 to your computer and use it in GitHub Desktop.
determinate if running in azure fabric, emulated or not
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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