private void PoseANewQuestion() { QuestionItem question = null; if (_provider.TryGetQuestion(ref question)) { _controller.PoseAQuestion(question); } }
public bool TryGetQuestion(ref QuestionItem question) { if (!_questions.Value.Any()) { return(false); } question = GetQuestion(); return(true); }
public void PoseAQuestion(QuestionItem question) { if (question == null) { throw new Exception(); } _view.BroadcastMessage(question.Question); _model = QuestionStateFactory.BuildQuestionState(question); }
public QuestionState(QuestionItem item, IAnswerMatchingStrategy matchingStrategy) { this.item = item; _matchingStrategy = matchingStrategy; }
public static QuestionState BuildQuestionState(QuestionItem question) { return(new QuestionState(question, new FuzzyAnswerMatchStrategy())); }
public void AddQuestion(QuestionItem questionItem) { _questions.Value.Enqueue(questionItem); }