Exemple #1
0
        protected virtual void SpaceOccupied1(VehicleParked vehicle)
        {
            var handler = SpaceOccupied;

            if (handler != null)
            {
                handler(vehicle);
            }
        }
Exemple #2
0
        public ParkingSpace FindVehicle(VehicleParked vehicle)
        {
            for (var spaces = 0; spaces < GarageSettings.GarageSize; spaces++)
            {
                if (parkingGarage[spaces, spaces] == vehicle)
                {
                    return(ParkingSpace.At(parkingSpace1: 2));
                }
            }

            throw new ArgumentException("The car is not in the garage");
        }
Exemple #3
0
 public void AddSpace(ParkingSpace parkingSpace, VehicleParked vehicle)
 {
     parkingGarage[parkingSpace.ParkingSpace1, parkingSpace.ParkingSpace1] = vehicle;
 }