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