static void Main(string[] args)
        {
            ApplicationMediator mediator = new ApplicationMediator();

            ConcreteColleague desktop = new ConcreteColleague(mediator);
            MobileColleague   mobile  = new MobileColleague(mediator);

            mediator.addColleague(desktop);
            mediator.addColleague(mobile);

            desktop.send("Hello World");
            mobile.send("Hello");

            Console.ReadKey();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            ApplicationMediator mediator = new ApplicationMediator();

            ConcreteColleague desktop = new ConcreteColleague(mediator);
            MobileColleague mobile = new MobileColleague(mediator);

            mediator.addColleague(desktop);
            mediator.addColleague(mobile);

            desktop.send("Hello World");
            mobile.send("Hello");

            Console.ReadKey();
        }
Exemple #3
0
 public MobileColleague(ApplicationMediator applicationMediator)
     : base(applicationMediator)
 {
 }
Exemple #4
0
 public ConcreteColleague(ApplicationMediator applicationMediator)
     : base(applicationMediator)
 {
 }
 public MobileColleague(ApplicationMediator applicationMediator)
     : base(applicationMediator)
 {
 }
 public ConcreteColleague(ApplicationMediator applicationMediator)
     : base(applicationMediator)
 {
 }