public DiscussionStarted(Tenant tenantId, ForumId forumId, DiscussionId discussionId, Author author, string subject, string exclusiveOwner)
 {
     this.TenantId = tenantId;
     this.ForumId = forumId;
     this.DiscussionId = discussionId;
     this.Author = author;
     this.Subject = subject;
     this.ExclusiveOwner = exclusiveOwner;
 }
        public Discussion(Tenant tenantId, ForumId forumId, DiscussionId discussionId, Author author, string subject, string exclusiveOwner = null)
        {
            AssertionConcern.AssertArgumentNotNull(tenantId, "The tenant must be provided.");
            AssertionConcern.AssertArgumentNotNull(forumId, "The forum id must be provided.");
            AssertionConcern.AssertArgumentNotNull(discussionId, "The discussion id must be provided.");
            AssertionConcern.AssertArgumentNotNull(author, "The author must be provided.");
            AssertionConcern.AssertArgumentNotEmpty(subject, "The subject must be provided.");

            Apply(new DiscussionStarted(tenantId, forumId, discussionId, author, subject, exclusiveOwner));
        }
 public PostedToDiscussion(Tenant tenantId, ForumId forumId, DiscussionId discussionId, PostId postId, Author author, string subject, string bodyText, PostId replyToPostId)
 {
     this.TenantId = tenantId;
     this.ForumId = forumId;
     this.DiscussionId = discussionId;
     this.PostId = postId;
     this.Author = author;
     this.Subject = subject;
     this.BodyText = bodyText;
     this.ReplyToPostId = replyToPostId;
 }
Exemple #4
0
 void When(PostedToDiscussion e)
 {
     this.tenantId = e.TenantId;
     this.forumId = e.ForumId;
     this.discussionId = e.DiscussionId;
     this.postId = e.PostId;
     this.author = e.Author;
     this.subject = e.Subject;
     this.bodyText = e.BodyText;
     this.replyToPostId = e.ReplyToPostId;
 }
Exemple #5
0
        public Post(Tenant tenantId, ForumId forumId, DiscussionId discussionId, PostId postId, Author author, string subject, string bodyText, PostId replyToPostId = null)
        {
            AssertionConcern.AssertArgumentNotNull(tenantId, "The tenant must be provided.");
            AssertionConcern.AssertArgumentNotNull(forumId, "The forum id must be provided.");
            AssertionConcern.AssertArgumentNotNull(discussionId, "The discussion id must be provided.");
            AssertionConcern.AssertArgumentNotNull(postId, "The post id must be provided.");
            AssertionConcern.AssertArgumentNotNull(author, "The author must be provided.");
            AssertPostContent(subject, bodyText);

            Apply(new PostedToDiscussion(tenantId, forumId, discussionId, postId, author, subject, bodyText, replyToPostId));
        }
 public Post Post(ForumIdentityService forumIdService, Author author, string subject, string bodyText, PostId replyToPostId = null)
 {
     return new Post(
         this.tenantId,
         this.forumId,
         this.discussionId,
         forumIdService.GetNexPostId(),
         author,
         subject,
         bodyText,
         replyToPostId);
 }
 void When(DiscussionStarted e)
 {
     this.tenantId = e.TenantId;
     this.forumId = e.ForumId;
     this.discussionId = e.DiscussionId;
     this.author = e.Author;
     this.subject = e.Subject;
     this.exclusiveOwner = e.ExclusiveOwner;
 }
Exemple #8
0
 public Discussion StartDiscussionFor(ForumIdentityService forumIdService, Author author, string subject, string exclusiveOwner = null)
 {
     AssertOpen();
     return new Discussion(
         this.tenantId,
         this.forumId,
         forumIdService.GetNextDiscussionId(),
         author,
         subject,
         exclusiveOwner);
 }