示例#1
0
        static void Main(string[] args)
        {
            var mediator   = new ManagerMediator();
            var customer   = new Customer(mediator);
            var programmer = new Programmer(mediator);
            var tester     = new Tester(mediator);

            mediator.Customer   = customer;
            mediator.Programmer = programmer;
            mediator.Tester     = tester;
            customer.Send("We have an order, need to make a program");
            programmer.Send("I have done program, need to test it");
            tester.Send("I have done testing, here is ready program for you");
        }
示例#2
0
        static void Main(string[] args)
        {
            ManagerMediator mediator   = new ManagerMediator();
            Colleague       customer   = new CustomerColleague(mediator);
            Colleague       programmer = new DeveloperColleague(mediator);
            Colleague       tester     = new TesterColleague(mediator);

            mediator.Customer   = customer;
            mediator.Programmer = programmer;
            mediator.Tester     = tester;
            customer.Send("Need new feature");
            programmer.Send("Feature is developed");
            tester.Send("Feature is ready for production");

            Console.Read();
        }
示例#3
0
        static void Main(string[] args)
        {
            ManagerMediator mediator   = new ManagerMediator();
            Colleague       customer   = new CustomerColleague(mediator);
            Colleague       programmer = new ProgrammerColleague(mediator);
            Colleague       tester     = new TesterColleague(mediator);

            mediator.Customer   = customer;
            mediator.Programmer = programmer;
            mediator.Tester     = tester;

            customer.Send("Есть заказ, надо сделать программу");
            programmer.Send("Программа готова, надо протестировать");
            tester.Send("Программа протестирована и готова к продаже");

            Console.ReadLine();
        }
示例#4
0
        public static void Test()
        {
            Console.WriteLine(string.Format("----- {0} -----", "SoftwareTeamSample"));

            ManagerMediator mediator   = new ManagerMediator();
            var             customer   = new CustomerColleague(mediator);
            var             programmer = new ProgrammerColleague(mediator);
            var             tester     = new TesterColleague(mediator);

            mediator.Customer   = customer;
            mediator.Programmer = programmer;
            mediator.Tester     = tester;
            customer.Send("Есть заказ, надо сделать программу");
            programmer.Send("Программа готова, надо протестировать");
            tester.Send("Программа протестирована и готова к продаже");

            Console.ReadLine();
        }