Exemple #1
0
        void Main()
        {
            IMediator mediator = new ConcreteMediator();

            ColleagueA talkColleague  = new ColleagueA(mediator);
            ColleagueB fightColleague = new ColleagueB(mediator);

            talkColleague.DoSomething();
            fightColleague.DoSomething();
        }
 public void RegisterA(ColleagueA cA)
 {
     talk = cA;
 }