SALG : 1-800-867-1389
EN
Dette indhold er ikke tilgængeligt på dit sprog, men her er den engelske version.

RoleEnvironmentStoppingEventArgs Class

Updated: October 18, 2011

Represents the arguments for the Stopping event, which occurs when a role instance is being stopped.

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

public ref class RoleEnvironmentStoppingEventArgs : public EventArgs

You typically handle the Stopping event in the OnStart method for the role.

The following code example shows how to run code when the role instance is being stopped:


public override bool OnStart()
{
   RoleEnvironment.Stopping += RoleEnvironmentStopping;
  
   return base.OnStart();
}    
   
private void RoleEnvironmentStopping(object sender, RoleEnvironmentStoppingEventArgs e) 
{
   // Add code that is run when the role instance is being stopped
}

System.Object
   System.EventArgs
    Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironmentStoppingEventArgs

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

Target Platforms

Syntes du, dette var nyttigt?
(1500 tegn tilbage)
Tak for din feedback

Fællesskabsindhold

Tilføj
Vis:
© 2014 Microsoft