private ClientVehicle findClientVehicleInGarageByLicenseNumber(string i_LicenseNumber) { ClientVehicle WantedClientVehicle = r_ClientVehiclesCollection[i_LicenseNumber]; if (WantedClientVehicle == null) { throw new ArgumentException(string.Format("License Number: {0}, don't exist in the garage.", i_LicenseNumber)); } return(WantedClientVehicle); }
public bool AddVehicleToGarage(ClientVehicle i_NewClientVehicle) { bool isNewClientVehicleHasAdded = true; if (r_ClientVehiclesCollection.ContainsKey(i_NewClientVehicle.GetVehicleLicenseCode()) == false) { addClientVehicleToGarageCollection(i_NewClientVehicle); } else { ChangeClientVehicleStatus(i_NewClientVehicle.GetVehicleLicenseCode(), ClientVehicle.eClientVehicleStatus.InRepair); isNewClientVehicleHasAdded = false; } return(isNewClientVehicleHasAdded); }
public void RechargeClientVehicleByLicenseNumber(string i_LicenseNumber, float i_AmountOfMinutes) { ClientVehicle clientVehiclesToCharge = findClientVehicleInGarageByLicenseNumber(i_LicenseNumber); clientVehiclesToCharge.RechargeVehicle(i_AmountOfMinutes); }
public void RefuelClientVehicleByLicenseNumber(string i_LicenseNumber, FueledEngine.eFuelType i_WantedFuelType, float i_AmountOfFuel) { ClientVehicle clientVehiclesToRefuel = findClientVehicleInGarageByLicenseNumber(i_LicenseNumber); clientVehiclesToRefuel.RefuelVehicle(i_AmountOfFuel, i_WantedFuelType); }
public void InflateTiresOfClientVehicleToMaximum(string i_LicenseNumber) { ClientVehicle clientVehicleToInflate = findClientVehicleInGarageByLicenseNumber(i_LicenseNumber); clientVehicleToInflate.InflateVehicleTiresToMaximum(); }
public void ChangeClientVehicleStatus(string i_LicenseNumber, ClientVehicle.eClientVehicleStatus i_NewClientVehicleStatus) { ClientVehicle clientVehiclesToChange = findClientVehicleInGarageByLicenseNumber(i_LicenseNumber); clientVehiclesToChange.ClientVehicleStatus = i_NewClientVehicleStatus; }
public string GetClientVehicleInformation(string i_LicenseNumber) { ClientVehicle clientVehicle = findClientVehicleInGarageByLicenseNumber(i_LicenseNumber); return(clientVehicle.GetClientVehicleInformation()); }
private void addClientVehicleToGarageCollection(ClientVehicle i_NewClientVehicle) { r_ClientVehiclesCollection.Add(i_NewClientVehicle.GetVehicleLicenseCode(), i_NewClientVehicle); }