Created
August 27, 2012 23:14
-
-
Save sandrinodimattia/3493258 to your computer and use it in GitHub Desktop.
RoleEnvironment.Changing/Changed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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