Example #1
0
        static void Main(string[] args)
        {
            var cm = new ConcreteMediator();
            var c1 = new ConcreateColleague1(cm);
            var c2 = new ConcreateColleague2(cm);

            cm.SetColleague1(c1);
            cm.SetColleague2(c2);
            c1.Action();
            c2.Action();
            Console.ReadKey();
        }
Example #2
0
 public void SetColleague2(ConcreateColleague2 theColleague)
 {
     m_Colleague2 = theColleague;
 }