public InteractiveSqlApplication(ILogger logger, SqlExecutor sqlExecutor, HintGenerator hintGenerator, Course course) { m_Logger = logger; m_SqlExecutor = sqlExecutor; m_HintGenerator = hintGenerator; m_Course = course; m_Questions = course.Lessons .SelectMany(lesson => lesson.Questions) .ToDictionary(question => question.Identify()); }
private static Question FirstQuestion(Course course) { return Question(course, 0); }
private static Question Question(Course course, int index) { return course.Lessons.Single().Questions[index]; }