Beispiel #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);
            }
        }
Beispiel #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);
            }
        }