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

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

            talkColleague.DoSomething();
            fightColleague.DoSomething();
        }
Beispiel #2
0
 public void RegisterB(ColleagueB cB)
 {
     fight = cB;
 }