Пример #1
0
        public IEnumerable <AnswerChoice> GetAnswerChoices()
        {
            int id = 1;

            foreach (Choice choice in Choices)
            {
                yield return(AnswerChoice.FromChoice(choice, id));

                id++;
            }
        }
Пример #2
0
        public static AnswerChoice FromChoice(Choice choice, int id)
        {
            var answerChoice = new AnswerChoice();

            answerChoice.Id              = id;
            answerChoice.Text            = choice.Text;
            answerChoice.IsCorrectChoice = choice.IsCorrectChoice;
            answerChoice.ImageContents   = choice.ImageContents;
            answerChoice.Rationale       = choice.Rationale;

            return(answerChoice);
        }