RoleEnvironmentChangedEventArgs.Changes Property
Gets a collection of the configuration changes that were applied to a role instance.
Assembly: Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)
Property Value
Type: System.Collections.ObjectModel.ReadOnlyCollection<RoleEnvironmentChange>Type: System.Collections.ObjectModel.ReadOnlyCollection
A ReadOnlyCollection<T> of RoleEnvironmentChange objects. The changes can be of the RoleEnvironmentTopologyChange type or the RoleEnvironmentConfigurationSettingChange type.
The following code example shows how to retrieve the configuration changes from 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"); } }
Show: