Skip to content

Instantly share code, notes, and snippets.

@sandrinodimattia
Created August 27, 2012 23:14
Show Gist options
  • Select an option

  • Save sandrinodimattia/3493258 to your computer and use it in GitHub Desktop.

Select an option

Save sandrinodimattia/3493258 to your computer and use it in GitHub Desktop.
RoleEnvironment.Changing/Changed
public class WebRole : RoleEntryPoint
{
public override bool OnStart()
{
RoleEnvironment.Changing += OnChanging;
RoleEnvironment.Changed += OnChanged;
return base.OnStart();
}
private void OnChanging(object sender, RoleEnvironmentChangingEventArgs e)
{
if ((e.Changes.Any(change => change is RoleEnvironmentConfigurationSettingChange)))
{
e.Cancel = true;
}
}
private void OnChanged(object sender, RoleEnvironmentChangedEventArgs e)
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment