コード例 #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);
 }