Exemple #1
0
 public Question(string title, List<Answer> answers, QuestionType questionType, Image image = null)
 {
     Title = title;
     Answers = answers;
     QuestionType = questionType;
     Image = image;
 }
Exemple #2
0
        public Answer(int id, QuestionType questionType, string title, bool isCorrect = false, Image image = null)
        {
            Id = id;
            Title = title;
            IsCorrect = isCorrect;
            _questionType = questionType;

            if (image != null)
                Image = image.ToImage();
        }
Exemple #3
0
        public Question(int id, string title, List<DomainModel.Entities.Answer> answers, QuestionType questionType, Image image = null)
        {
            Id = id;
            Title = title;
            Answers = answers.Select(x => x.ToAnswer(questionType)).ToList();
            QuestionType = questionType;

            if (QuestionType == DomainModel.Entities.QuestionType.ImageQuestion)
            {
                Title = "Что на картинке?";
            }

            if (image != null)
                Image = image.ToImage();
        }