private void TryToAnswerQuestion(QuestionArgs question, IPresident asker) { if (CanAnswerQuestion(question)) { asker.RecieveAnswer(question, GetAnswer(question)); } }
public PresidentsController(IPresident president) { _pr = president; }
public Scientist(IPresident president) { president.HasQuestion += TryToAnswerQuestion; }
public IEnumerable <QuestionArgs> FindQuestions(Predicate <QuestionArgs> interest, IPresident asker) { return this.Questions.Where(x => interest(x) == true && x.IsAuthorizedToAsk(asker)) }