public static void Run()
        {
            var rescueVehicle = new List <Vehicle>
            {
                VehicleCreator.Create("BMW X7", Port.Large),
                VehicleCreator.Create("Jeep Compass", Port.Medium),
                VehicleCreator.Create("Hyundai HB20", Port.Small),
            };

            rescueVehicle.ForEach(x => TowService.CreateTowService(x).AssistVehicle());
        }
Example #2
0
 public override Vehicle CreateVehicle(string name, Port port)
 => VehicleCreator.Create(name, port);