RoleInstanceStatusCheckEventArgs Class
Updated: October 18, 2011
Represents the arguments for the StatusCheck event, which occurs at a regular interval to indicate the status of a role instance.
Assembly: Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)
System::EventArgs
Microsoft.WindowsAzure.ServiceRuntime::RoleInstanceStatusCheckEventArgs
| Name | Description | |
|---|---|---|
![]() | RoleInstanceStatusCheckEventArgs() | Initializes a new instance of the RoleInstanceStatusCheckEventArgs class. |
| Name | Description | |
|---|---|---|
![]() | Status | Gets the status of the role instance. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object^) | (Inherited from Object.) |
![]() | Finalize() | (Inherited from Object.) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetType() | (Inherited from Object.) |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | SetBusy() | |
![]() | ToString() | (Inherited from Object.) |
A role instance may indicate that it is in one of two states: Ready or Busy. If the state of a role instance is Ready, it is prepared to receive requests from the load balancer. If the state of the instance is Busy, it will not receive requests from the load balancer.
The following code example shows how to write out 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"); }
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
.jpeg?cs-save-lang=1&cs-lang=cpp)
.jpeg?cs-save-lang=1&cs-lang=cpp)
.jpeg?cs-save-lang=1&cs-lang=cpp)