예제 #1
0
        public IParkingSlot FindParking(VehicleBase vehicle)
        {
            IParkingLocator parkingLocator = _parkingLocatorProvider.LocateService(vehicle);

            IParkingSlot availableParkingSlots = parkingLocator.LocateFreeSlots(vehicle);

            return(availableParkingSlots);
        }
예제 #2
0
 public void DeallocateParkingSlot(VehicleBase vehicle)
 {
     _bookingTracker.MarkVacant(vehicle);
 }
예제 #3
0
 public void AllocateParkingSlot(VehicleBase vehicle, IParkingSlot parkingSlot)
 {
     parkingSlot.MarkedOccupied(vehicle);
     _bookingTracker.MarkBooked(vehicle, parkingSlot);
 }