예제 #1
0
        static void Main(string[] args)
        {
            Director1 dir1 = new Director1();
            Director2 dir2 = new Director2();

            Car car1 = dir1.Construct(new Builder1());

            car1.CarSummary();

            Car car2 = dir2.Construct(new Builder1());

            car2.CarSummary();

            Console.ReadKey();
        }
예제 #2
0
        static void Main(string[] args)
        {
            Director1 director1 = new Director1();
            Director2 director2 = new Director2();

            Builder1 b1 = new Builder1();
            Builder1 b2 = new Builder1();

            director1.Construct(b1);
            director2.Construct(b2);

            Product p1 = b1.GetProduct();
            Product p2 = b2.GetProduct();

            Console.WriteLine(p1.Run());
            Console.WriteLine(p2.Run());
        }