RoleInstanceStatusCheckEventArgs.Status Property


Gets the status of the role instance.

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

public RoleInstanceStatus Status { get; internal set; }

The following code example shows how to retrieve the status of the role instance:

public override bool OnStart()
   RoleEnvironment.StatusCheck += RoleEnvironmentStatusCheck;

   return base.OnStart();

private void RoleEnvironmentStatusCheck(object sender, RoleInstanceStatusCheckEventArgs e)
   Trace.WriteLine("The status of the role instance:" + e.Status, "Information");
Return to top