protected virtual void SpaceOccupied1(VehicleParked vehicle) { var handler = SpaceOccupied; if (handler != null) { handler(vehicle); } }
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"); }
public void AddSpace(ParkingSpace parkingSpace, VehicleParked vehicle) { parkingGarage[parkingSpace.ParkingSpace1, parkingSpace.ParkingSpace1] = vehicle; }