示例#1
0
文件: Post.cs 项目: attila3453/alsing
        public void ReplyTo(string userName, string userEmail, string userWebsite, string text)
        {
            EnsureCommentsEnabled();

            var userInfo = new UserInfo(userName, userEmail, userWebsite);
            var comment = new Comment(this, userInfo, text);
            _comments.Add(comment);

            DomainEvents.Raise(new RepliedToPostEvent(this, comment));
        }
示例#2
0
 public RepliedToPostEvent(Post post,Comment comment)
 {
     this.Post = post;
     this.Comment = comment;
 }
示例#3
0
 public ApprovedCommentEvent(Comment comment)
 {
     this.Comment = comment;
 }