Пример #1
0
        private void CreateVehicleInstance(Enums.VehicleType vehicleType, VehiclesData vehicleDataInput)
        {
            switch (vehicleType)
            {
            case Enums.VehicleType.Car:
                this.vehicle = new Car(vehicleDataInput);
                break;

            case Enums.VehicleType.Trunk:
                this.vehicle = new Trunk(vehicleDataInput);
                break;

            case Enums.VehicleType.Motorcycle:
                this.vehicle = new Motorcycle(vehicleDataInput);
                break;

            default:
                throw new Exception(string.Format("Unexpected vehicle type: {0}", vehicleType.ToString()));
            }
        }
Пример #2
0
 public Vehicle(VehiclesData vehicleDataInput)
 {
     this.vehiclesData = vehicleDataInput;
 }
Пример #3
0
 public Motorcycle(VehiclesData vehicleDataInput)
     : base(vehicleDataInput)
 {
     this.WashService = new HandWashFacilities();
 }
Пример #4
0
 public Auto(VehiclesData vehicleDataInput)
     : base(vehicleDataInput)
 {
 }
Пример #5
0
 public Service(Enums.VehicleType vehicleType, VehiclesData vehicleDataInput, IEnumerable <Enums.ServiceActions> actions)
 {
     this.servicesList = actions;
     this.CreateVehicleInstance(vehicleType, vehicleDataInput);
 }
Пример #6
0
 public Car(VehiclesData vehicleDataInput)
     : base(vehicleDataInput)
 {
     this.WashService = new SelfServiceFacilities();
 }
Пример #7
0
 public Trunk(VehiclesData vehicleDataInput)
     : base(vehicleDataInput)
 {
     this.WashService = new InBayAutomatics();
 }