public static TFirst CreateFromOptionList(OptionList <TSecond, TFirst> optionList) => new TFirst { Name = optionList.Name, Option1 = GetAlternativeDescription(optionList, 0), Option2 = GetAlternativeDescription(optionList, 1), Option3 = GetAlternativeDescription(optionList, 2) };
private static string GetAlternativeDescription(OptionList <TSecond, TFirst> optionList, int indexExercise) => optionList.Options?.ElementAtOrDefault(indexExercise)?.Description;