Пример #1
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();
        }
Пример #2
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();
        }
Пример #3
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();
        }