示例#1
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();
        }
示例#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();
        }
示例#3
0
 public MobileColleague(ApplicationMediator applicationMediator)
     : base(applicationMediator)
 {
 }
示例#4
0
 public ConcreteColleague(ApplicationMediator applicationMediator)
     : base(applicationMediator)
 {
 }
示例#5
0
 public MobileColleague(ApplicationMediator applicationMediator)
     : base(applicationMediator)
 {
 }
示例#6
0
 public ConcreteColleague(ApplicationMediator applicationMediator)
     : base(applicationMediator)
 {
 }