(0) exportieren Drucken
Alle erweitern

RoleInstanceStatusCheckEventArgs-Klasse

Represents the arguments for the StatusCheck event, which occurs at a regular interval to indicate the status of a role instance.

Namespace: Microsoft.WindowsAzure.ServiceRuntime
Assembly: Microsoft.WindowsAzure.ServiceRuntime (in microsoft.windowsazure.serviceruntime.dll)

'Usage
Dim instance As RoleInstanceStatusCheckEventArgs

public class RoleInstanceStatusCheckEventArgs : EventArgs
public class RoleInstanceStatusCheckEventArgs extends EventArgs
public class RoleInstanceStatusCheckEventArgs extends EventArgs

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");
}

System.Object
   System.EventArgs
    Microsoft.WindowsAzure.ServiceRuntime.RoleInstanceStatusCheckEventArgs

Alle öffentlichen statischen (freigegebenen in Visual Basic) Member dieses Typs sind threadsicher. Bei Instanzmembern ist die Threadsicherheit nicht gewährleistet.

Entwicklungsplattformen

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Server 2008 und Windows 2000

Zielplattformen

Community-Beiträge

Anzeigen:
© 2014 Microsoft