Beispiel #1
0
 public Comment(Post post, UserInfo userInfo, string text)
 {
     this.Post = post;
     this.UserInfo = userInfo;
     this.Body = text;
     this.CreationDate = DateTime.Now;
 }
Beispiel #2
0
        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));
        }