public FlightsManagementPresenter( IFlightsManagementView view, IFlightsServices flightsServices, INumberGenerator numberGenerator) : base(view) { if (flightsServices == null) { throw new ArgumentNullException(nameof(IFlightsServices)); } if (numberGenerator == null) { throw new ArgumentNullException(nameof(INumberGenerator)); } this.flightsServices = flightsServices; this.numberGenerator = numberGenerator; this.View.OnFlightsGetData += this.View_OnFlightsGetData; this.View.OnFlightsUpdateItem += this.View_OnFlightsUpdateItem; this.View.OnFlightsDeleteItem += this.View_OnFlightsDeleteItem; this.View.OnFlightsAddItem += this.View_OnFlightsAddItem; this.View.OnUniqueFlightNumberGetItem += this.View_OnUniqueFlightNumberGetItem; }
public FlightLegsManagementPresenter( IFlightLegsManagementView view, IFlightLegsServices flightLegsServices, IAirportsServices airportsServices, IFlightsServices flightsServices, IRoutesServices routesServices, ILegInstancesServices legInstancesServices) : base(view) { if (flightLegsServices == null) { throw new ArgumentNullException(nameof(IFlightLegsServices)); } if (airportsServices == null) { throw new ArgumentNullException(nameof(IAirportsServices)); } if (flightsServices == null) { throw new ArgumentNullException(nameof(IFlightsServices)); } if (routesServices == null) { throw new ArgumentNullException(nameof(IRoutesServices)); } if (legInstancesServices == null) { throw new ArgumentNullException(nameof(ILegInstancesServices)); } this.flightLegsServices = flightLegsServices; this.airportsServices = airportsServices; this.flightLegsServices = flightLegsServices; this.flightsServices = flightsServices; this.routesServices = routesServices; this.legInstancesServices = legInstancesServices; this.View.OnFlightLegsGetData += this.View_OnFlightLegsGetData; this.View.OnFlightLegsUpdateItem += this.View_OnFlightLegsUpdateItem; this.View.OnFlightLegsDeleteItem += this.View_OnFlightLegsDeleteItem; this.View.OnFlightLegsAddItem += this.View_OnFlightLegsAddItem; this.View.OnAirportsGetData += this.View_OnAirportsGetData; this.View.OnFlightsGetData += this.View_OnFlightsGetData; this.View.OnRoutesGetData += this.View_OnRoutesGetData; this.View.OnLegInstancesGetData += this.View_OnLegInstancesGetData; this.View.OnAirportGetItem += this.View_OnAirportGetItem; }
public FlightNumbersController(IFlightsServices flightsServices, INumberGenerator numberGenerator) { this.flightsServices = flightsServices; this.numberGenerator = numberGenerator; }