コード例 #1
0
 private Dictionary<string, object> GenerateQuestionDictionary(Question question)
 {
     return new Dictionary<string, object>
         {
             {"description", question.Description},
             {"correctQuery", question.CorrectQuery},
             {"identifier", question.Identify()},
             {"expectedAnswer", InteractiveSqlJson.QueryResultToJson(m_QuestionAnswers[question.Identify()])}
         };
 }
コード例 #2
0
 private LogEvent LogEventForAnswer(Question question, Answer answer, AnswerResult answerResult)
 {
     return LogEvent
         .OfSeverity(Severity.Info)
         .Add("site", "learnsomesql.com")
         .Add("eventName", "submittedAnswer")
         .Add("question", question.Description)
         .Add("correctQuery", question.CorrectQuery)
         .Add("submittedQuery", answer.Query)
         .Add("isCorrect", answerResult.IsCorrect);
 }
コード例 #3
0
 private QueryResultTable Answer(Question question)
 {
     return m_SqlExecutor
         .ExecuteQuery(question.CorrectQuery)
         .ExpectSuccess();
 }