Created
March 5, 2016 18:21
-
-
Save dcomartin/7dd8927c284233102230 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
public partial class Startup | |
{ | |
public void Configuration(IAppBuilder app) | |
{ | |
ConfigureAuth(app); | |
// Initialize the ClusterHelper | |
ClusterHelper.Initialize(new ClientConfiguration | |
{ | |
Servers = new List<Uri> | |
{ | |
new Uri("http://localhost:8091/") | |
} | |
}); | |
// Register a callback that will dispose of the ClusterHelper on app shutdown | |
var properties = new AppProperties(app.Properties); | |
var token = properties.OnAppDisposing; | |
if (token != CancellationToken.None) | |
{ | |
token.Register(() => | |
{ | |
ClusterHelper.Close(); | |
}); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment