Beispiel #1
0
 public CommentBase(Guid commentId, CreatorInfo creatorInfo, string content)
 {
     this.CommentId = commentId;
     this.SetCreatorInfo(creatorInfo);
     this.SetContent(content);
     this.CreatedAt = DateTime.UtcNow;
 }
Beispiel #2
0
        private void SetCreatorInfo(CreatorInfo creatorInfo)
        {
            if (creatorInfo is null)
            {
                throw new InvalidAggregationException("Creator's information are required in a comment.");
            }

            if (this.CreatorInfo == creatorInfo)
            {
                return;
            }

            this.CreatorInfo = creatorInfo;
        }
Beispiel #3
0
 public PostComment(Guid commentId, CreatorInfo creatorInfo, string content)
     : base(commentId, creatorInfo, content)
 {
 }
Beispiel #4
0
 public PostComment(CreatorInfo creatorInfo, string content)
     : this(Guid.NewGuid(), creatorInfo, content)
 {
 }
Beispiel #5
0
 public CommentBase(CreatorInfo creatorInfo, string content)
     : this(Guid.NewGuid(), creatorInfo, content)
 {
 }
Beispiel #6
0
 public PlateComment(Guid commentId, CreatorInfo creatorInfo, string content, int note = 0)
     : base(commentId, creatorInfo, content)
 {
     this.Note = note;
 }
Beispiel #7
0
 public PlateComment(CreatorInfo creatorInfo, string content, int note = 0)
     : this(Guid.NewGuid(), creatorInfo, content)
 {
 }