영업: 1-800-867-1380
EN
이 콘텐츠는 한국어로 제공되지 않아 영어 버전으로 표시됩니다.

RoleEnvironment.SimultaneousChanged Event

Updated: December 6, 2013

Occurs after a simultaneous change to the service configuration has been applied to the running instances of a role. A simultaneous change affects all role instances at the same time.

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

public static event EventHandler<SimultaneousChangedEventArgs> SimultaneousChanged

The SimultaneousChanged event and the SimultaneousChanging event are used together to identify and manage simultaneous configuration changes to the service model. The SimultaneousChangedEventArgs object provides the changes that were made in the service configuration. The changes are of the type SimultaneousTopologyChange.

The following code example shows how to use the SimultaneousChangedEventArgs object to write out the list of simultaneous topology changes that were made to the role:


public override bool OnStart()
{
   RoleEnvironment.SimultaneousChanged += RoleEnvironmentSimultaneousChanged;
  
   return base.OnStart();
}

private void RoleEnvironmentSimultaneousChanged(object sender, 
   SimultaneousChangedEventArgs e)
{
   // Get the list of topology changes
   var topologyChanges = 
      e.Changes.OfType<SimultaneousTopologyChange>();
      
   foreach (var change in topologyChanges) 
   {
      var message = "Topology change: " + change.RoleName;
      Trace.WriteLine(message, "Information");
   }
}

Development Platforms

Windows Vista, Windows 7 and Windows Server 2008

Target Platforms

이 정보가 도움이 되었습니까?
(1500자 남음)
의견을 주셔서 감사합니다.

커뮤니티 추가 항목

추가
표시:
© 2014 Microsoft