コード例 #1
0
 public Question(string title, int allowedTime, DifficultyE difficulty, List <Answer> answers)
 {
     this.Title        = title;
     this.AllowedTime  = allowedTime;
     this.Difficulty   = difficulty;
     this.Answers      = answers;
     this.QuestionType = this.Answers.Where(c => c.IsCorrect).Count() > 1 ? QuestionTypeE.MultipleChoices : QuestionTypeE.SingleChoice;
 }
コード例 #2
0
 public Quizz(Guid id, string title, string description, DifficultyE difficulty, float rating, string category, List <Question> questions) : this(id, title, description, rating, category)
 {
     this.Questions  = questions;
     this.Difficulty = difficulty;
 }
コード例 #3
0
 public Question(long id, string title, int allowedTime, DifficultyE difficulty, QuestionTypeE questionType, List <Answer> answers) : this(id, title, allowedTime, difficulty, answers)
 {
     this.QuestionType = questionType;
 }
コード例 #4
0
 public Question(long id, string title, int allowedTime, DifficultyE difficulty, List <Answer> answers) : this(title, allowedTime, difficulty, answers)
 {
     this.Id = id;
 }