/// <summary> /// Initializes a new instance of the <see cref="PollQuestion" /> class. /// </summary> /// <param name="index">The index.</param> /// <param name="question">The question.</param> /// <param name="aType">a type.</param> /// <param name="answers">The answers.</param> /// <param name="correctAnswer">The correct answer.</param> internal PollQuestion(uint index, string question, int aType, IEnumerable <string> answers, string correctAnswer) { Index = index; Question = question; AType = (PollAnswerType)aType; Answers = answers.ToList(); CorrectAnswer = correctAnswer; }
/// <summary> /// Initializes a new instance of the <see cref="PollQuestion" /> class. /// </summary> /// <param name="index">The index.</param> /// <param name="question">The question.</param> /// <param name="aType">a type.</param> /// <param name="answers">The answers.</param> /// <param name="correctAnswer">The correct answer.</param> internal PollQuestion(uint index, string question, int aType, IEnumerable<string> answers, string correctAnswer) { Index = index; Question = question; AType = (PollAnswerType) aType; Answers = answers.ToList(); CorrectAnswer = correctAnswer; }
/// <summary> /// Initializes a new instance of the <see cref="PollQuestion" /> class. /// </summary> /// <param name="index">The index.</param> /// <param name="question">The question.</param> /// <param name="aType">a type.</param> /// <param name="answers">The answers.</param> /// <param name="correctAnswer">The correct answer.</param> internal PollQuestion(int index, string question, int aType, string answers, string correctAnswer) { Index = index; Question = question; AType = (PollAnswerType)aType; Answers = answers.Split(','); CorrectAnswers = correctAnswer.Split(','); }
public static string GetPollAnswerTypeAsString(PollAnswerType pollAnswerType) => PollAnswerTypes.FirstOrDefault(p => p.Value == pollAnswerType).Key;