public static void Run() { VehicleDTO vehicle = new VehicleDTO(); vehicle.VIN = "12345"; vehicle.Make = "Maruti"; vehicle.Model = "Ritz ZXi"; vehicle.Name = "Maruti Suzuki Ritz 2014 Model"; vehicle.Year = "2014"; vehicle.Type = VehicleType.Car; Shop shop = new Shop(); CarBuilder carBuilder = new CarBuilder(vehicle); shop.Contruct(carBuilder); vehicle.Type = VehicleType.Truck; TruckBuilder truckBuilder = new TruckBuilder(vehicle); shop.Contruct(truckBuilder); vehicle.Type = VehicleType.Bike; BikeBuilder bikeBuilder = new BikeBuilder(vehicle); shop.Contruct(bikeBuilder); Console.ReadKey(); }
public CarBuilder(VehicleDTO vehicle) : base(vehicle) { }
public BikeBuilder(VehicleDTO vehicle) : base(vehicle) { }
public TruckBuilder(VehicleDTO vehicle) : base(vehicle) { }
public void BuildVehicle(VehicleDTO _vehicle) { }
public VehicleBuilder(VehicleDTO _vehicle) { vehicle = _vehicle; }