Exemple #1
0
 public Car BuildCar()
 {
     carBuilder.BuildBody();
     carBuilder.BuildEngine();
     carBuilder.BuildWheel();
     return(carBuilder.GetCar());
 }
Exemple #2
0
 public void BuildFullCar()
 {
     _builder.BuildTire();
     _builder.BuildDoor();
     _builder.BuildCarFrame();
     _builder.BuildEngine();
 }
 public Car Construct()
 {
     builder.BuildCarSkeleton();
     builder.BuildCarWindows();
     builder.BuildEngine();
     builder.BuildWheels();
     return(builder.GetResult());
 }
Exemple #4
0
 public void Build()
 {
     _builder.BuildBodyStyle();
     _builder.BuildPower();
     _builder.BuildEngine();
     _builder.BuildBrakes();
     _builder.BuildSeats();
     _builder.BuildWindows();
     _builder.BuildFuelType();
 }
        public void BuildCar()
        {
            Console.WriteLine("We have new order, time to build new car! Let's move!");
            Console.ReadKey();
            List <Task> taskList = new List <Task>();

            taskList.Add(Task.Factory.StartNew(() => _carBuilder.BuildBody()));
            taskList.Add(Task.Factory.StartNew(() => _carBuilder.BuildEngine()));
            taskList.Add(Task.Factory.StartNew(() => _carBuilder.BuildSuspension()));

            Console.WriteLine("How long do i have to wait on one car?!");
            Task.WaitAll(taskList.ToArray());
            Console.WriteLine("Finally, your car is ready sir");
        }
Exemple #6
0
 public void ConstructCar(ICarBuilder builder)
 {
     builder.BuildWheels();
     builder.BuildAddons();
     builder.BuildEngine();
 }
 public void MakeCar()
 {
     CarBuilder.BuildBody();
     CarBuilder.BuildTransmission();
     CarBuilder.BuildEngine();
 }
Exemple #8
0
 public void BuildCar(ICarBuilder carBuilder)
 {
     carBuilder.BuildBody();
     carBuilder.BuildEngine();
     carBuilder.BuildSeats();
 }
Exemple #9
0
 public void Construct(ICarBuilder builder)
 {
     builder.BuildWheel();
     builder.BuildEngine();
 }
 public void BuildThatCar()
 {
     _carBuilder.BuildCarcas();
     _carBuilder.BuildEngine();
     _carBuilder.BuildWheels();
 }
Exemple #11
0
 public void makeCar()
 {
     carBuilder.BuildEngine();
     carBuilder.BuildTires();
 }