Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ConfigurationSettingName Property
Collapse the table of content
Expand the table of content

RoleEnvironmentConfigurationSettingChange.ConfigurationSettingName Property


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 Property ConfigurationSettingName As String
	Friend Set
End Property

Property Value

Type: System.String

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");
Return to top
© 2015 Microsoft