public void Register(IDIContainer container) { container.Register <IPage, MainPage>("MainPage"); container.Register <IPage, Dashboard>("Dashboard"); #if OAUTH container.Register <IPage, OAuthLogin>("Login"); #else container.Register <IPage, Login>("Login"); #endif container.Register <INavigationService, DefaultNavigationService>(); container.Register <IDispatchService, UniversalDispatchService>(); container.Register <ILoginViewModel, LoginViewModel>(); container.Register <IDashboardViewModel, DashboardViewModel>(); container.Register <IMainPageViewModel, MainPageViewModel>(); container.Register <IActivityStreamViewModel, ActivityStreamViewModel>(); container.Register <IActivityViewModel, ActivityViewModel>(); #if CACHE_ENABLED container.Unregister <ICache>(); container.Register <ICache, StorageCache>(); #endif }
public async Task Logout() { if (_cache != null) { await _cache.Clear(); } try { _container.Unregister <IAuthorization>("Session"); } catch (Exception) { } try { _container.Unregister <IClient>("Session"); } catch (Exception) { } }