/// <summary> /// Submit an <see cref="IAnswer"/> to an <see cref="IQuestion"/> /// </summary> /// <param name="questionId"></param> /// <param name="answerId"></param> /// <exception cref="InvalidOperationException"></exception> public void TryAnswer(Guid questionId, Guid answerId) { logger.LogInformation("TryAnswer", questionId, answerId); var question = ActiveQuestions.FirstOrDefault(x => x.Id == questionId); if (question is null) { throw new InvalidOperationException(nameof(questionId)); } question.SubmitAnswer(answerId); }
public void AddActiveQuestions(IList <AdvisorQuestion> activeQuestions) { ActiveQuestions.AddRange(activeQuestions); }