Beispiel #1
0
 private void Apply(TestPostAdded e)
 {
     if (this.Posts == null)
     {
         this.Posts = new List <TestPost>();
     }
     Posts.Add(new TestPost()
     {
         ForumId     = this.Id,
         Id          = e.Id,
         Markup      = e.Markup,
         Posted      = e.Posted,
         Poster      = e.Poster,
         PosterRoles = e.PosterRoles,
         Tags        = e.Tags,
         Number      = (this.Posts.Count + 1)
     });
 }
Beispiel #2
0
        public void AddPost(Guid id,
                            string poster,
                            string[] PosterRoles,
                            string Markup,
                            DateTimeOffset posted,
                            string[] tags)
        {
            // TODO: CanPost test

            TestPostAdded post = new TestPostAdded(this.Id,
                                                   this.Id,
                                                   poster,
                                                   PosterRoles,
                                                   Markup,
                                                   posted,
                                                   tags);

            ApplyChange(post);
        }