public void ChangeVehicleState(string i_LicensePlate, VehiclesInGarage.eStateInGarage i_ChangeState) { VehiclesInGarage vehicle = GetExistVehicles(i_LicensePlate); if (vehicle == null) { throw new ArgumentNullException(); } vehicle.StateInGarage = i_ChangeState; }
public List <string> LicenseNumbersByState(VehiclesInGarage.eStateInGarage i_State) { List <string> FilteredLicensePlates = new List <string>(); foreach (VehiclesInGarage vehiclesInGarage in m_CarsInGarage.Values) { if (i_State == vehiclesInGarage.StateInGarage) { FilteredLicensePlates.Add(vehiclesInGarage.Vehicle.LicensePlate); } } return(FilteredLicensePlates); }