Thank you sbelini,
Just one question. The logout is performed asynchronously, so as I'm closing the applicatoin I do not have any means of waiting for the logout callback to be called. Is it possible to somehow force the application to wait for the callback .... or is it secured that the LogoutAsync() will go through to the server before the application shuts down?
The below call "persistenceGateway.Logout(null)" will call
p_manager.LogoutAsync(null,null);
private void Application_Exit( object sender , EventArgs e )
{
var persistenceGateway = m_bootstrapper.Container.Resolve<IPersistenceGateway>();
if(persistenceGateway.p_isLoggedIn)
persistenceGateway.Logout(null); // I set callback to null, as I do not know how to wait for it
}