/// <summary>
 /// checking out the vehicle
 /// </summary>
 /// <param name="licensePlateID">of the vehicle</param>
 /// <returns>true if check out succeed, else false</returns>
 public bool CheckOut(string licensePlateID)
 {
     if (OccupiedLots.ContainsKey(licensePlateID))
     {
         OccupiedLots[licensePlateID].freeLot();
         OccupiedLots.Remove(licensePlateID);
         return(true);
     }
     return(false);
 }
Esempio n. 2
0
        public Car Pick(string token)
        {
            if (!IsCarInLot(token))
            {
                throw new CarNotFoundException("Not found.");
            }
            var car = OccupiedLots[token];

            OccupiedLots.Remove(token);
            return(car);
        }