Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created March 5, 2016 18:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcomartin/7dd8927c284233102230 to your computer and use it in GitHub Desktop.
Save dcomartin/7dd8927c284233102230 to your computer and use it in GitHub Desktop.
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