Exemplo n.º 1
0
 public CommentBase(Guid commentId, CreatorInfo creatorInfo, string content)
 {
     this.CommentId = commentId;
     this.SetCreatorInfo(creatorInfo);
     this.SetContent(content);
     this.CreatedAt = DateTime.UtcNow;
 }
Exemplo n.º 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;
        }
Exemplo n.º 3
0
 public PostComment(Guid commentId, CreatorInfo creatorInfo, string content)
     : base(commentId, creatorInfo, content)
 {
 }
Exemplo n.º 4
0
 public PostComment(CreatorInfo creatorInfo, string content)
     : this(Guid.NewGuid(), creatorInfo, content)
 {
 }
Exemplo n.º 5
0
 public CommentBase(CreatorInfo creatorInfo, string content)
     : this(Guid.NewGuid(), creatorInfo, content)
 {
 }
Exemplo n.º 6
0
 public PlateComment(Guid commentId, CreatorInfo creatorInfo, string content, int note = 0)
     : base(commentId, creatorInfo, content)
 {
     this.Note = note;
 }
Exemplo n.º 7
0
 public PlateComment(CreatorInfo creatorInfo, string content, int note = 0)
     : this(Guid.NewGuid(), creatorInfo, content)
 {
 }