SDK : Windows Azure SDK 1.5
In Build Windows Azure SDK 1.5 got announced. Windows Azure SDK 1.5 allows us to check whether Roles are running in emulator or not?
Static method IsEmulated returns Boolean value after checking whether Role instance is running in emulator or not.
Signature of IsEmulated is as below and it is part of the class RoleEnvironment
You can check running instance is in emulator or not as below,
bool isRunningInEmulator = RoleEnvironment.IsEmulated; if (isRunningInEmulator) Label1.Text = "Running in Emulator"; else Label1.Text = "Hey you are on Cloud";
I hope this post was useful. Thanks for reading
If you find my posts useful you may like to follow me on twitter http://twitter.com/debug_mode or may like Facebook page of my blog http://www.facebook.com/DebugMode.Net If you want to see post on a particular topic please do write on FB page or tweet me about that, I would love to help you.
Follow @debug_mode
Leave a Reply