public static void Execute()
        {
            var vehicles = new List <Vehicle>
            {
                VehicleCreator.Create("Celta", VehicleSize.Small),
                VehicleCreator.Create("Jetta", VehicleSize.Medium),
                VehicleCreator.Create("BMW X6", VehicleSize.Big)
            };

            vehicles.ForEach(vehicle => AutoHelp.CreateAutoHelp(vehicle).PerformService());
        }
コード例 #2
0
        public static void Run()
        {
            var veiculosSocorro = new List <Vehicle>
            {
                VehicleCreator.Create("Celta", Size.Small),
                VehicleCreator.Create("Jetta", Size.Medium),
                VehicleCreator.Create("BMW X6", Size.Big)
            };

            veiculosSocorro.ForEach(v => SelfHelp.CreateSelfHelp(v).CarryOutService());
        }
コード例 #3
0
 public override Vehicle CreateVehicle(string model, Size size)
 {
     return(VehicleCreator.Create(model, size));
 }