public void Handle(DocumentDeleted message) { ActiveCollectionDocuments .Where(x => x.Id == message.DocumentId) .ToList() .Apply(x => ActiveCollectionDocuments.Remove(x)); }
void GetDocumentsForActiveCollection() { if (ActiveCollection == null) { return; } ActiveCollectionDocuments.GetTotalResults = () => ActiveCollection.Count; ActiveCollectionDocuments.LoadPage(); }
void IHandle <DocumentDeleted> .Handle(DocumentDeleted message) { ActiveCollectionDocuments .Where(x => x.Id == message.DocumentId) .ToList() .Apply(x => ActiveCollectionDocuments.Remove(x)); ActiveCollection.Count -= 1; if (ActiveCollection.Count == 0) { Collections.Remove(ActiveCollection); } }
void GetDocumentsForActiveCollection() { TrackCurrentCollection(); ActiveCollectionDocuments.ClearResults(); if (ActiveCollection == null) { return; } ActiveCollectionDocuments.GetTotalResults = () => ActiveCollection.Count; ActiveCollectionDocuments.LoadPage(); }