Exportar (0) Imprimir
Expandir todo

RoleEnvironmentTopologyChange.RoleName (Propiedad)

Gets the name of the role for which the topology is changing.

Espacio de nombres: Microsoft.WindowsAzure.ServiceRuntime
Ensamblado: Microsoft.WindowsAzure.ServiceRuntime (en microsoft.windowsazure.serviceruntime.dll)

'Uso
Dim instance As RoleEnvironmentTopologyChange
Dim value As String

value = instance.RoleName

public string RoleName { get; }
/** @property */
/** @attribute CompilerGeneratedAttribute() */ 
public String get_RoleName ()

CompilerGeneratedAttribute 
public function get RoleName () : String

Valor de propiedad

A String that contains the name of the role for which the topology is changing.

The following code example shows how to retrieve the name of the role for which the topology is changing:


public override bool OnStart() 
{
   RoleEnvironment.Changed += RoleEnvironmentChanged;
 
   return base.OnStart();
}

private void RoleEnvironmentChanged(object sender, RoleEnvironmentChangedEventArgs e)
{
   var changes = e.Changes.OfType<RoleEnvironmentTopologyChange>();
   foreach (var change in changes)
   {
      Trace.WriteLine("The topology was changed for: " + change.RoleName, "Information");
   }
}

Cualquier miembro estático público (Shared en Visual Basic) de este tipo es seguro para subprocesos. No se garantiza que los miembros de instancias sean seguros para la ejecución de subprocesos.

Plataformas de desarrollo

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

Plataformas de destino

Adiciones de comunidad

Mostrar:
© 2014 Microsoft