private SingletonAirports() { guid = new Guid(); airportDao = new AirportDao(); dictionaryAirport = airportDao.Airports(); LANG = "en-US"; }
/// <summary> /// Creates a new instance of the /// <see cref="SpringAir.Data.Ado.ItineraryDao"/> class. /// </summary> /// <param name="aircraftDao"> /// An appropriate implementation of the /// <see cref="SpringAir.Data.IAircraftDao"/> that this DAO /// can use to find <see cref="SpringAir.Domain.Aircraft"/> with. /// </param> /// <param name="airportDao"> /// An appropriate implementation of the /// <see cref="SpringAir.Data.IAirportDao"/> that this DAO /// can use to find <see cref="SpringAir.Domain.Airport"/> /// instances with. /// </param> /// <exception cref="System.ArgumentNullException"> /// If either of the supplied arguments is <cref lang="null"/>. /// </exception> public ItineraryDao(IAircraftDao aircraftDao, IAirportDao airportDao) { #region Sanity Checks if (aircraftDao == null) { throw new ArgumentNullException("aircraftDao", "The 'aircraftDao' argument is required."); } if (airportDao == null) { throw new ArgumentNullException("airportDao", "The 'airportDao' argument is required."); } #endregion this.aircraftDao = aircraftDao; this.airportDao = airportDao; }
/// <summary> /// Creates a new instance of the /// <see cref="SpringAir.Service.DefaultBookingAgent"/> class. /// </summary> /// <param name="airportDao"> /// An appropriate implementation of the /// <see cref="SpringAir.Data.IAirportDao"/> that this DAO /// can use to find <see cref="SpringAir.Domain.Airport"/> /// instances with. /// </param> /// <param name="flightDao"> /// An appropriate implementation of the /// <see cref="SpringAir.Data.IFlightDao"/> that this DAO /// can use to find <see cref="SpringAir.Domain.Flight"/> /// instances with. /// </param> /// <exception cref="System.ArgumentNullException"> /// If either of the supplied arguments is <cref lang="null"/>. /// </exception> public DefaultBookingAgent(IAirportDao airportDao, IFlightDao flightDao) { #region Sanity Checks if (airportDao == null) { throw new ArgumentNullException("airportDao", "The 'airportDao' argument is required."); } if (flightDao == null) { throw new ArgumentNullException("legDao", "The 'legDao' argument is required."); } #endregion this.airportDao = airportDao; this.flightDao = flightDao; }
public BookingAgentStub(IAirportDao airportDao, IAircraftDao aircraftDao) { this.airportDao = airportDao; this.aircraftDao = aircraftDao; }