Example #1
0
    static void Main()
    {
        var c1 = new ConcreteColleague1();
        var c2 = new ConcreteColleague2();

        var m = new ConcreteMediator(c1, c2);

        c1.SetMediator(m);
        c2.SetMediator(m);

        c1.Send("How are you?");
        c2.Send("Fine, thanks");

        Console.ReadKey();
    }