Ejemplo n.º 1
0
 public void Construct(VehicleBuilder vehicleBuilder)
 {
     vehicleBuilder.BuildFrame();
     vehicleBuilder.BuildEngine();
     vehicleBuilder.BuildWheels();
     vehicleBuilder.BuildDoors();
 }
Ejemplo n.º 2
0
        public VehicleProduct(VehicleBuilder theBuilder)
        {
            // Create director for the vehicle builders
            VehicleDirector director = new VehicleDirector();

            // theProductData was inherited
            theProductData = director.Construct(theBuilder);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Builder uses a complex series of steps 
 /// </summary>
 /// <param name="vehicleBuilder"> The abstract builder class </param>
 public ProductData Construct(VehicleBuilder vehicleBuilder)
 {
     // The steps to "streamline" the building process
     // Director class is not neccassary
     vehicleBuilder.BuildFrame();
     vehicleBuilder.BuildEngine();
     vehicleBuilder.BuildWheels();
     vehicleBuilder.BuildDoors();
     return vehicleBuilder.Vehicle;
 }
Ejemplo n.º 4
0
 public VehicleCreator(VehicleBuilder builder)
 {
     _builder = builder;
 }