public Information(string i_NameOfOwner, string i_PhoneOfOwner, Garage.eStatusOfVehicle i_StatusInGarage, C19_Ex03_GarageLogic.Vehicle.Information i_InformationAboutActualVehicle)
 {
     r_NameOfOwner    = i_NameOfOwner;
     r_PhoneOfOwner   = i_PhoneOfOwner;
     r_StatusInGarage = i_StatusInGarage;
     r_InformationAboutActualVehicle = i_InformationAboutActualVehicle;
 }
Ejemplo n.º 2
0
 public Vehicle(C19_Ex03_GarageLogic.Vehicle i_vehicle, string i_NameOfOwner, string i_PhoneOfOwner)
 {
     m_vehicle      = i_vehicle;
     m_NameOfOwner  = i_NameOfOwner;
     m_PhoneOfOwner = i_PhoneOfOwner;
     m_status       = Garage.eStatusOfVehicle.InRepair;
 }
Ejemplo n.º 3
0
 public IEnumerable <string> GetLicenseNumbersWhoseVehicleStatusIs(Garage.eStatusOfVehicle i_Status)
 {
     foreach (var currentVehicleInGarage in m_VehiclesInGarage)
     {
         if (currentVehicleInGarage.Value.Status == i_Status)
         {
             yield return(currentVehicleInGarage.Key);
         }
     }
 }
Ejemplo n.º 4
0
        public void ChangeStatusOfVehicleWhoseLicenseNumberIs(string i_NumberOfLicense, Garage.eStatusOfVehicle i_NewStatus)
        {
            if (i_NumberOfLicense == null)
            {
                throw new ArgumentNullException("i_NumberOfLicense", "i_NumberOfLicense must not be null.");
            }

            if (not(m_VehiclesInGarage.ContainsKey(i_NumberOfLicense)))
            {
                throw new ArgumentException("The garage does not have a vehicle with this license number " + i_NumberOfLicense + '.', "i_NumberOfLicense");
            }

            m_VehiclesInGarage[i_NumberOfLicense].Status = i_NewStatus;
        }
Ejemplo n.º 5
0
 public string GetLicenseNumbersInASingleStringWhoseVehicleStatusIs(Garage.eStatusOfVehicle i_Status)
 {
     return(IEnumerableTo.StringFrom(GetLicenseNumbersWhoseVehicleStatusIs(i_Status)));
 }
Ejemplo n.º 6
0
 private StringWriter getLicenseNumbersInASingleStringWriterWhoseVehicleStatusIs(Garage.eStatusOfVehicle i_Status)
 {
     return(IEnumerableTo.StringWriterFrom(GetLicenseNumbersWhoseVehicleStatusIs(i_Status)));
 }