public ForumThreadInfo(IForumAuthor author, DateTime postedOn, IForumThreadType threadType, IEnumerable <IForumThreadTag> tags, IForumPostInfo latestPost) { if (author == null) { throw new ArgumentNullException("author"); } if (threadType == null) { throw new ArgumentNullException("threadType"); } if (tags == null) { throw new ArgumentNullException("tags"); } if (latestPost == null) { throw new ArgumentNullException("latestPost"); } Author = author; PostedOn = postedOn; ThreadType = threadType; Tags = tags.ToArray(); LatestPost = latestPost; }
public ForumThreadSubmission(string name, DateTime postedOn, IForumAuthor author, IForumThreadType threadType) { if (string.IsNullOrEmpty(name)) { throw new ArgumentException("Value can't be null or empty.", "name"); } if (postedOn.Kind != DateTimeKind.Utc) { throw new ArgumentException("Value must be UTC.", "postedOn"); } if (author == null) { throw new ArgumentNullException("author"); } Name = name; PostedOn = postedOn; Author = author; ThreadType = threadType; }