Was deze pagina nuttig?
Uw feedback over deze inhoud is belangrijk. Laat ons weten wat u denkt.
Aanvullende feedback?
1500 tekens resterend
Exporteren (0) Afdrukken
Alles uitvouwen
EN
Deze inhoud is niet beschikbaar in uw taal, maar wel in het Engels.

RoleEnvironmentConfigurationSettingChange Class

Updated: October 18, 2011

Represents a change to the configuration of a role.

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

public class RoleEnvironmentConfigurationSettingChange : RoleEnvironmentChange, IEquatable<RoleEnvironmentConfigurationSettingChange>

When you make a change to the configuration of a role and apply the changes to role instances, the changes are contained in RoleEnvironmentConfigurationSettingChange objects. The RoleEnvironmentConfigurationSettingChange objects only contain configuration changes that were made to role that corresponds to the currently running role instance.

For more information about defining the service model for a hosted service, see Setting Up a Hosted Service for Windows Azure.

The following code example shows how to use the RoleEnvironmentConfigurationSettingChange object to write out the changes:


public override bool OnStart() 
{
   RoleEnvironment.Changed += RoleEnvironmentChanged;
 
   return base.OnStart();
}
 
private void RoleEnvironmentChanged(object sender, RoleEnvironmentChangedEventArgs e)
{
   // Get the list of configuration changes
   var settingChanges = e.Changes.OfType<RoleEnvironmentConfigurationSettingChange>();
      
   foreach (var settingChange in settingChanges) 
   {
      var message = "Setting: " + settingChange.ConfigurationSettingName;
      Trace.WriteLine(message, "Information");
   }
}

System.Object
   Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironmentChange
    Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironmentConfigurationSettingChange

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

Community-inhoud

Toevoegen
Weergeven:
© 2015 Microsoft