Created
June 8, 2014 17:28
-
-
Save david-mills/fc9e6e506adefd7cf50b to your computer and use it in GitHub Desktop.
This file contains 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
namespace Foo.Bar | |
{ | |
using Castle.MicroKernel.Lifestyle; | |
using Microsoft.WindowsAzure.ServiceRuntime; | |
public class AzureSingletonLifestyleManager : SingletonLifestyleManager | |
{ | |
public AzureSingletonLifestyleManager() | |
{ | |
RoleEnvironment.Changed += this.RoleEnvironment_Changed; | |
} | |
private void RoleEnvironment_Changed(object sender, RoleEnvironmentChangedEventArgs e) | |
{ | |
this.Dispose(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment