private void ManagedServer_ClientDisconnected(object sender, Arrowgene.Services.Network.ManagedConnection.Event.DisconnectedEventArgs e) { this.dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() => { ClientViewModel clientViewModel = this.clientViewModelContainer.GetClientViewModel(e.ClientSocket); if (clientViewModel != null) { DatabaseManager.Instance.InsertClient(clientViewModel); clientViewModel.Dispose(); this.clientViewModelContainer.Remove(clientViewModel); } })); }
public async Task <bool> DisposeAsync() { Singleton.getDialogueBox().showSearch(ConfigurationManager.AppSettings["close_message"]); unsubscribeEvents(); ItemViewModel.Dispose(); ClientViewModel.Dispose(); QuoteViewModel.Dispose(); OrderViewModel.Dispose(); ReferentialViewModel.Dispose(); AgentViewModel.Dispose(); NotificationViewModel.Dispose(); SecurityLoginViewModel.Dispose(); HomeViewModel.Dispose(); ChatRoomCurrentView = null; await ChatRoomViewModel.DisposeAsync(); deleteCache(); return(true); }