public CompilationBlocker() { var q = new Question() { Answers = new Collection<Answer>(), Comments = new Collection<Comment>(), Content = string.Empty, CreatedBy = string.Empty, CreatedOn = DateTimeOffset.UtcNow, Id = string.Empty, Stats = new Stats(), Subject = string.Empty, Tags = new Collection<string>(), }; var a = new Answer() { Comments = new Collection<Comment>(), Content = string.Empty, CreatedByUserId = string.Empty, CreatedOn = DateTimeOffset.UtcNow, Stats = new Stats(), LastEditedOn = (DateTimeOffset?) null, }; var c = new Comment() { Content = string.Empty, CreatedOn = DateTimeOffset.UtcNow, CreatedByUserId = string.Empty, UpVoteCount = 0, }; var s = new Stats() { DownVoteCount = 0, UpVoteCount = 0, FavoriteCount = 0, ViewsCount = 0, }; var u = new User() { CreatedOn = DateTime.UtcNow, DisplayName = string.Empty, Email = string.Empty, FullName = string.Empty, FavoriteTags = new List<string>(), Id = string.Empty, IsActive = true, Reputation = 0, }; }
public Question ToQuestion() { var question = new Question { CreatedOn = DateTimeOffset.UtcNow, CreatedBy = "users/1", Answers = new List<Answer>(), Comments = new List<Comment>(), Content = Content, Subject = Subject, Tags = (Tags ?? string.Empty).Split(new[] {' ', ','}, StringSplitOptions.RemoveEmptyEntries) }; return question; }