Esempio n. 1
0
 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>();
 }
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
 public Profile(DateTime registrationDate)
 {
     RegistrationDate = registrationDate;
     ViewStatistic    = new ViewStatistic <Profile>();
 }