public Commentary(User author, DateTime creationTime, Post post, string body) { Author = author ?? throw new ArgumentNullException(nameof(author)); CreationTime = creationTime; Post = post ?? throw new ArgumentNullException(nameof(post)); Body = body ?? throw new ArgumentNullException(nameof(body)); ViewStatistic = new ViewStatistic <Commentary>(); }
public Post(DateTime creationTime, User author, string title, string body, string bodyPreview) { CreationTime = creationTime; Author = author ?? throw new ArgumentNullException(nameof(author)); Title = title ?? throw new ArgumentNullException(nameof(title)); Body = body ?? throw new ArgumentNullException(nameof(body)); BodyPreview = bodyPreview ?? throw new ArgumentNullException(nameof(bodyPreview)); ViewStatistic = new ViewStatistic<Post>(); ModerationInfo = new ModerationInfo(); }
public Profile(DateTime registrationDate) { RegistrationDate = registrationDate; ViewStatistic = new ViewStatistic <Profile>(); }