Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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