Exemple #1
0
        public void TestMethod()
        {
            IBuilder       builder  = new ConcreteBuilder();
            IDirector      director = new DirectorA();
            IList <string> schedule = director.Construct(builder);

            foreach (string str in schedule)
            {
                Console.WriteLine(str);
            }

            Console.WriteLine("****************************");

            director = new DirectorB();
            schedule = director.Construct(builder);
            foreach (string str in schedule)
            {
                Console.WriteLine(str);
            }
        }
Exemple #2
0
        public void TestMethod()
        {
            IBuilder builder = new ConcreteBuilder();
            IDirector director = new DirectorA();
            IList<string> schedule = director.Construct(builder);
            foreach(string str in schedule)
            {
                Console.WriteLine(str);
            }

            Console.WriteLine("****************************");

            director = new DirectorB();
            schedule = director.Construct(builder);
            foreach (string str in schedule)
            {
                Console.WriteLine(str);
            }
        }