示例#1
0
        internal static Models.Question ToQuestion(this ClientModels.Question question)
        {
            if (question == null)
            {
                throw new ArgumentNullException(nameof(question));
            }

            return(new Models.Question()
            {
                PossibleAnswers = question.PossibleAnswers,
                Text = question.Text,
                Type = question.Type.ToQuestionType()
            });
        }
示例#2
0
        internal static Tailspin.Web.Shared.Models.QuestionAnswer ToQuestionAnswer(this ClientModels.Question question)
        {
            if (question == null)
            {
                throw new ArgumentNullException(nameof(question));
            }

            return(new Shared.Models.QuestionAnswer()
            {
                PossibleAnswers = question.PossibleAnswers,
                QuestionText = question.Text,
                QuestionType = question.Type.ToQuestionType()
            });
        }