void Main() { IMediator mediator = new ConcreteMediator(); ColleagueA talkColleague = new ColleagueA(mediator); ColleagueB fightColleague = new ColleagueB(mediator); talkColleague.DoSomething(); fightColleague.DoSomething(); }
public void RegisterB(ColleagueB cB) { fight = cB; }