Exemple #1
0
        static void Main()
        {
            VehicleBuilder builder;
            Shop           shop = new Shop();

            builder = new ScooterBuilder();
            shop.Construct(builder);
            builder.Vehicle.Show();

            builder = new CarBuilder();
            shop.Construct(builder);
            builder.Vehicle.Show();

            builder = new MotorCycleBuilder();
            shop.Construct(builder);
            builder.Vehicle.Show();

            Console.ReadKey();
        }
Exemple #2
0
        private static void Main()
        {
            var shop = new Shop();

            VehicleBuilder builder = new ScooterBuilder();

            shop.Construct(builder);
            builder.Vehicle.Show();

            builder = new CarBuilder();
            shop.Construct(builder);
            builder.Vehicle.Show();

            builder = new MotorcyleBuilder();
            shop.Construct(builder);
            builder.Vehicle.Show();

            Console.Write(@"Press any key to continue...");
            Console.ReadKey(true);
        }