public FaresManagementPresenter(IFaresManagementView view, IFaresServices faresServices, IRoutesServices routesServices) : base(view) { if (faresServices == null) { throw new ArgumentNullException(nameof(IFaresServices)); } if (routesServices == null) { throw new ArgumentNullException(nameof(IRoutesServices)); } this.faresServices = faresServices; this.routesServices = routesServices; this.View.OnFaresGetData += this.View_OnFaresGetData; this.View.OnFaresUpdateItem += this.View_OnFaresUpdateItem; this.View.OnFaresDeleteItem += this.View_OnFaresDeleteItem; this.View.OnFaresAddItem += this.View_OnFaresAddItem; this.View.OnRoutesGetData += this.View_OnRoutesGetData; }
public FaresController(IFaresServices faresServices) { this.faresServices = faresServices; }
public LegInstancesManagementPresenter( ILegInstancesManagementView view, ILegInstancesServices legInstancesServices, IFlightLegsServices flightLegsServices, IFlightStatusesServices flightStatusesServices, IFaresServices faresServices, IAircraftsServices aircraftsServices, IUserNotificationsServices userNotificationsServices, INotificationsServices notificationsServices, IUsersServices usersServices, IAirportsServices airportsServices) : base(view) { if (legInstancesServices == null) { throw new ArgumentNullException(nameof(ILegInstancesServices)); } if (flightLegsServices == null) { throw new ArgumentNullException(nameof(IFlightLegsServices)); } if (flightLegsServices == null) { throw new ArgumentNullException(nameof(IFlightStatusesServices)); } if (aircraftsServices == null) { throw new ArgumentNullException(nameof(IAircraftsServices)); } if (faresServices == null) { throw new ArgumentNullException(nameof(IFaresServices)); } if (userNotificationsServices == null) { throw new ArgumentNullException(nameof(IUserNotificationsServices)); } if (notificationsServices == null) { throw new ArgumentNullException(nameof(INotificationsServices)); } if (usersServices == null) { throw new ArgumentNullException(nameof(IUsersServices)); } if (aircraftsServices == null) { throw new ArgumentNullException(nameof(IAirportsServices)); } this.legInstancesServices = legInstancesServices; this.flightLegsServices = flightLegsServices; this.flightStatusesServices = flightStatusesServices; this.aircraftsServices = aircraftsServices; this.faresServices = faresServices; this.userNotificationsServices = userNotificationsServices; this.notificationsServices = notificationsServices; this.usersServices = usersServices; this.airportsServices = airportsServices; this.View.OnLegInstancesGetData += this.View_OnLegInstancesGetData; this.View.OnLegInstancesUpdateItem += this.View_OnLegInstancesUpdateItem; this.View.OnLegInstancesDeleteItem += this.View_OnLegInstancesDeleteItem; this.View.OnLegInstancesAddItem += this.View_OnLegInstancesAddItem; this.View.OnFlightLegsGetData += this.View_OnFlightLegsGetData; this.View.OnFlightStatusesGetData += this.View_OnFlightStatusesGetData; this.View.OnAircraftsGetData += this.View_OnAircraftsGetData; this.View.OnFaresGetData += this.View_OnFaresGetData; this.View.OnAirportInfoGetItem += this.View_OnAirportInfoGetItem; this.View.OnSendNotificationToSubscribedUsers += this.View_OnSendNotificationToSubscribedUsers; }