示例#1
0
        public void AddComment(string memberHandle, string comment)
        {
            var @event = new CommentAddedEvent {
            Comment = comment,
            MemberHandle = memberHandle,
            CreatedAt = DateTime.Now
              };

              ApplyEvent(@event);
        }
示例#2
0
 public void OnAddComment(CommentAddedEvent @event)
 {
     var comment = new Comment(this, @event.MemberHandle, @event.Comment, @event.CreatedAt);
       _comments.Add(comment);
 }