SimultaneousChangedEventArgs Class

 

Represents the arguments for the SimultaneousChanged event, which occurs after a simultaneous configuration change has been applied to a role. A simultaneous configuration change affects all role instances at the same time.

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

Inheritance Hierarchy

System.Object
  System.EventArgs
    Microsoft.WindowsAzure.ServiceRuntime.SimultaneousChangedEventArgs

Syntax

public class SimultaneousChangedEventArgs : EventArgs
public ref class SimultaneousChangedEventArgs : EventArgs
type SimultaneousChangedEventArgs = 
    class
        inherit EventArgs
    end
Public Class SimultaneousChangedEventArgs
    Inherits EventArgs

Properties

Name Description
System_CAPS_pubproperty Changes

Gets a collection of the topology changes that were applied to a role.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Remarks

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

Thread Safety

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

See Also

Microsoft.WindowsAzure.ServiceRuntime Namespace

Return to top