/// <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; }
/// <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; }