예제 #1
0
 public void Handle(OpenDiscussion openDiscussion)
 {
     var participants = openDiscussion.IdsOfParticipants.Select(x => new Participant(new EmailAddress(x))).ToList();
     var linkId = new LinkId(openDiscussion.LinkId);
     var topic = new Topic(openDiscussion.Topic);
     var initiator = new Participant(new EmailAddress(openDiscussion.IdOfInitiator));
     var discussion = new Discussion(linkId, topic, initiator, participants);
     _repository.Save(discussion);
 }
예제 #2
0
 public void Handle(SharedLink @event)
 {
     var openDiscussion = new OpenDiscussion(@event.LinkId, @event.Topic, @event.EmailOfSharer, @event.EmailsOfReceivers);
     _bus.Send(openDiscussion);
 }