Export (0) Print
Expand All

RoleEnvironmentConfigurationSettingChange.ConfigurationSettingName Property

Updated: October 18, 2011

Gets the name of the configuration setting that has been changed.

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

public string ConfigurationSettingName { get; }

Property Value

Type: System.String

A String that contains the name of the configuration setting.

If the setting name is coming from the RoleEnvironmentChangedEventArgs object, the value is the new value. If the setting name is coming from the RoleEnvironmentChangingEventArgs object, the value is the old value because the change has not been applied yet. The value of the setting can be obtained with the GetConfigurationSettingValue method.

The following code example shows how to write out the setting names and values that have been changed:

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 settingName = settingChange.ConfigurationSettingName;
      var settingValue = 
      Trace.WriteLine(settingName + ": " + settingValue, "Information");

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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft