コード例 #1
0
        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());
        }
コード例 #2
0
 private static Question FirstQuestion(Course course)
 {
     return Question(course, 0);
 }
コード例 #3
0
 private static Question Question(Course course, int index)
 {
     return course.Lessons.Single().Questions[index];
 }