public Task Handle(UnsubscribedFromCollection notification) { lock (_contentList.SubscribedCollections) { var modSet = _contentList.SubscribedCollections.FirstOrDefault(x => x.CollectionID == notification.CollectionId); if (modSet != null) { _contentList.SubscribedCollections.Remove(modSet); } } return(Task.FromResult(0)); }
/* * async Task CollectionUpdated(CollectionUpdated evt) { * await Cheat.PublishDomainEvent(evt).ConfigureAwait(false); * } * * async Task CollectionVersionAdded(CollectionVersionAdded evt) { * await Cheat.PublishDomainEvent(evt).ConfigureAwait(false); * } */ async Task UnsubscribeFromCollection(UnsubscribedFromCollection evt) { await Cheat.PublishDomainEvent(evt).ConfigureAwait(false); }