public DispatcherController()
        {
            foreach (var t in Enum.GetValues(typeof(VehicleType)))
            {
                vehicleTypes.Add(t.ToString());
            }
            foreach (var t in Enum.GetValues(typeof(FareStatus)))
            {
                fareStatuses.Add(t.ToString());
            }

            DriverService  = (IDriverService)GlobalConfiguration.Configuration.DependencyResolver.GetService(typeof(IDriverService));
            VehicleService = (IVehicleService)GlobalConfiguration.Configuration.DependencyResolver.GetService(typeof(IVehicleService));
            FareService    = (IFareService)GlobalConfiguration.Configuration.DependencyResolver.GetService(typeof(IFareService));
        }
        public ManifestService(IOptions <BookingConfig> _bookingConfig, IRepository <Manifest, Guid> repository,
                               IRepository <SeatManagement, long> seatRepo,
                               IRepository <VehicleTripRegistration, Guid> repo,

                               IRepository <SubRoute> subRouteRepo,
                               IRepository <PickupPoint> pickupRepo,
                               IServiceHelper serviceHelper,
                               ISeatManagementService seatManagemengtRepo,
                               IVehicleTripRegistrationService vehicleTripRepo,
                               IRepository <Driver> driverRepo,
                               IEmployeeService employeeRepo,
                               IRepository <Terminal> terminalRepo,
                               IUnitOfWork unitOfWork,
                               IFareService fareSvc,
                               IRouteService routeSvc,
                               IJourneyManagementService journeyMgtSvc,
                               IPassportTypeService passportTypeRepo)
        {
            bookingConfig       = _bookingConfig.Value;
            _repository         = repository;
            _repo               = repo;
            _subRouteRepo       = subRouteRepo;
            _routeSvc           = routeSvc;
            _seatRepo           = seatRepo;
            _pickupRepo         = pickupRepo;
            _serviceHelper      = serviceHelper;
            _seatManagemengtSvc = seatManagemengtRepo;
            _vehicleTripRepo    = vehicleTripRepo;
            _driverRepo         = driverRepo;
            _employeeRepo       = employeeRepo;
            _unitOfWork         = unitOfWork;
            _fareSvc            = fareSvc;
            _journeyMgtSvc      = journeyMgtSvc;
            _terminalRepo       = terminalRepo;
            _passportTypeSvc    = passportTypeRepo;
        }
Exemple #3
0
 public FareController(IFareService fareService)
 {
     _fareService = fareService;
 }
 public DriverController()
 {
     FareService   = (IFareService)GlobalConfiguration.Configuration.DependencyResolver.GetService(typeof(IFareService));
     DriverService = (IDriverService)GlobalConfiguration.Configuration.DependencyResolver.GetService(typeof(IDriverService));
 }
 public FlightService(IFlightRepository repo, IFareService fareService, ILogger <FlightService> logger)
 {
     this._repo        = repo;
     this._fareService = fareService;
     this._logger      = logger;
 }
 public FlightService(IFlightRepository repo, IFareService fareService)
 {
     this._repo        = repo;
     this._fareService = fareService;
 }