public static QuestionAnswersSummary ToQuestionAnswerSummary(this ClientModels.QuestionAnswersSummary questionAnswersSummary) { if (questionAnswersSummary == null) { throw new ArgumentNullException(nameof(questionAnswersSummary)); } return(new QuestionAnswersSummary() { QuestionText = questionAnswersSummary.QuestionText, QuestionType = (QuestionType)Enum.Parse(typeof(QuestionType), questionAnswersSummary.QuestionType.ToString()), AnswersSummary = questionAnswersSummary.AnswersSummary, PossibleAnswers = questionAnswersSummary.PossibleAnswers }); }
internal static QuestionAnswersSummary ToQuestionAnswersSummary( this ClientModels.QuestionAnswersSummary questionAnswersSummary) { if (questionAnswersSummary == null) { throw new ArgumentException(nameof(questionAnswersSummary)); } return(new QuestionAnswersSummary() { AnswersSummary = questionAnswersSummary.AnswersSummary, PossibleAnswers = questionAnswersSummary.PossibleAnswers, QuestionText = questionAnswersSummary.QuestionText, QuestionType = (QuestionType)questionAnswersSummary.QuestionType }); }