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