private void chatPopupController_OnTabClosing(object o) { var vm = o as ConversationViewModel; if (null != vm) { conversations.Remove(vm.Conversation); vm.Conversation.Dispose(); viewModels.Remove(vm); } }
void ReevaluateDiscarded() { List <T> itemsAdded = new List <T>(); foreach (var item in discardedItems) { if (!Matches(item)) { itemsAdded.Add(item); OrderedInsert(item); } } foreach (var item in itemsAdded) { discardedItems.Remove(item); } }