RoleEnvironment.IsAvailable Property


Indicates whether the role instance is running in the Windows Azure environment.

Namespace:   Microsoft.WindowsAzure.ServiceRuntime
Assembly:  Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)


public static bool IsAvailable { get; }
property bool IsAvailable {
    static bool get();
static member IsAvailable : bool with get
Public Shared ReadOnly Property IsAvailable As Boolean

Property Value

Type: System.Boolean

Type: System.Boolean

true if the role instance is running in Windows Azure; otherwise, false.


If IsAvailable returns false all the other properties, methods and events of RoleEnvironment will throw exceptions.

See Also

RoleEnvironment Class
Microsoft.WindowsAzure.ServiceRuntime Namespace

Return to top