コード例 #1
0
 public void SetCarToParking(CarSubject car)
 {
     if (_parkingPlaces > 1)
     {
         this.cars.Add(car);
         _parkingPlaces--;
         NotifyObserversAboutParkingPlaces();
     }
 }
コード例 #2
0
 public void RemoveCarfromParking(CarSubject car)
 {
     this.cars.Remove(car);
     NotifyObserversAboutParkingPlaces();
     _parkingPlaces++;
 }