Ejemplo n.º 1
0
        public static MessageId Quack(IEventPublisher eventPublisher, UserId author, string content)
        {
            var messageId = MessageId.Generate();

            eventPublisher.Publish(new MessageQuacked(messageId, author, content));
            return(messageId);
        }
Ejemplo n.º 2
0
        public void Reply(IEventPublisher eventPublisher, UserId replier, string replyContent)
        {
            var evt = new ReplyMessagePublished(MessageId.Generate(), replier, replyContent, _projection.Id);

            eventPublisher.Publish(evt);
        }
Ejemplo n.º 3
0
        public static Message Publish(IEventPublisher eventPublisher, UserId author, string content)
        {
            var messagePublished = new MessagePublished(MessageId.Generate(), author, content);

            return(new Message(eventPublisher, messagePublished));
        }