public OrderReviewViewModel
        (
            IOrderWorkflowService orderWorkflowService,
            IPaymentService paymentService,
            IAccountService accountService,
            IVehicleTypeService vehicleTypeService,
            INetworkRoamingService networkRoamingService
        )
        {
            _vehicleTypeService    = vehicleTypeService;
            _orderWorkflowService  = orderWorkflowService;
            _accountService        = accountService;
            _paymentService        = paymentService;
            _networkRoamingService = networkRoamingService;

            Observe(_orderWorkflowService.GetAndObserveBookingSettings(), settings => SettingsUpdated(settings));
            Observe(_orderWorkflowService.GetAndObservePickupAddress(), address => Address = address);
            Observe(_orderWorkflowService.GetAndObservePickupDate(), DateUpdated);
            //We are throttling to prevent cases where we can cause the app to become unresponsive after typing fast.
            Observe(_orderWorkflowService.GetAndObserveNoteToDriver().Throttle(TimeSpan.FromMilliseconds(500)), note => Note = note);
            Observe(_orderWorkflowService.GetAndObserveTipIncentive().Throttle(TimeSpan.FromMilliseconds(500)), tipIncentive => DriverBonus = tipIncentive);
            Observe(_orderWorkflowService.GetAndObservePromoCode(), code => PromoCode = code);
            Observe(_networkRoamingService.GetAndObserveMarketSettings(), MarketChanged);

            _driverBonus = 5;

            GetIsCmtRideLinq().FireAndForget();
        }
 public VehicleInfoController(IVehicleInfoService vehicleInfoService, IVehicleTypeService vehicleTypeService, IBrandService brandService, IOwnerInfoService ownerInfoService)
 {
     _vehicleInfoService = vehicleInfoService;
     _vehicleTypeService = vehicleTypeService;
     _brandService       = brandService;
     _ownerInfoService   = ownerInfoService;
 }
Example #3
0
 public DbSeeder(
     IWorldService worldService,
     IFactionService factionService,
     IItemService itemService,
     IItemCategoryService itemCategoryService,
     IZoneService zoneService,
     IProfileService profileService,
     ILoadoutService loadoutService,
     IScrimRulesetManager rulesetManager,
     IFacilityService facilityService,
     IFacilityTypeService facilityTypeService,
     IVehicleService vehicleService,
     IVehicleTypeService vehicleTypeService,
     IDeathEventTypeService deathTypeService,
     ISqlScriptRunner sqlScriptRunner,
     ILogger <DbSeeder> logger
     )
 {
     _worldService        = worldService;
     _factionService      = factionService;
     _itemService         = itemService;
     _itemCategoryService = itemCategoryService;
     _zoneService         = zoneService;
     _profileService      = profileService;
     _loadoutService      = loadoutService;
     _rulesetManager      = rulesetManager;
     _facilityService     = facilityService;
     _facilityTypeService = facilityTypeService;
     _vehicleService      = vehicleService;
     _vehicleTypeService  = vehicleTypeService;
     _deathTypeService    = deathTypeService;
     _sqlScriptRunner     = sqlScriptRunner;
     _logger = logger;
 }
        public void Init()
        {
            vehicleTypeRepository = Substitute.For <IVehicleTypeRepository>();
            var mapper = new MapperConfiguration(x => x.AddProfile(new MappingProfile())).CreateMapper();

            log = Substitute.For <ILog>();
            vehicleTypeService = new VehicleTypeService(vehicleTypeRepository, mapper, log);
        }
 public VehicleTypeAppService(IMediatorHandler bus
                              , INotificationHandler <DomainNotification> notifications
                              , IVehicleTypeService vehicleTypeService)
 {
     _bus                = bus;
     _notifications      = (DomainNotificationHandler)notifications;
     _vehicleTypeService = vehicleTypeService;
 }
 public VehicleActivity()
 {
     vehicleService       = MainApplication.Container.Resolve <IVehicleService>();
     vehicleBrandService  = MainApplication.Container.Resolve <IVehicleBrandService>();
     vehicleModelService  = MainApplication.Container.Resolve <IVehicleModelService>();
     vehicleEngineService = MainApplication.Container.Resolve <IVehicleEngineService>();
     vehicleFuelService   = MainApplication.Container.Resolve <IVehicleFuelService>();
     vehicleTypeService   = MainApplication.Container.Resolve <IVehicleTypeService>();
 }
Example #7
0
 public VehicleAppService(IVehicleService vehicleService, IMediatorHandler bus
                          , INotificationHandler <DomainNotification> notifications
                          , IDriverService driverService
                          , IVehicleTypeService vehicleTypeService)
 {
     _vehicleService     = vehicleService;
     _bus                = bus;
     _notifications      = (DomainNotificationHandler)notifications;
     _vehicleTypeService = vehicleTypeService;
     _driverService      = driverService;
 }
Example #8
0
 public CreateModel(IVehicleService vehicleService, IVehicleColorService vehicleColorService, IFuelTypeService fuelTypeService,
                    IModelService modelService, IManufacturerService manufacturerService, ITransmissionTypeService transmissionTypeService, IVehicleTypeService vehicleTypeService)
 {
     _vehicleService          = vehicleService;
     _vehicleColorService     = vehicleColorService;
     _fuelTypeService         = fuelTypeService;
     _modelService            = modelService;
     _manufacturerService     = manufacturerService;
     _transmissionTypeService = transmissionTypeService;
     _vehicleTypeService      = vehicleTypeService;
 }
Example #9
0
 public SearchModel(ICarRentInformationService carRentInformationService,
                    IManufacturerService manufacturerService,
                    IModelService modelService,
                    IRentStateService rentStateService,
                    IVehicleTypeService vehicleTypeService)
 {
     _manufacturerService       = manufacturerService;
     _modelService              = modelService;
     _rentStateService          = rentStateService;
     _vehicleTypeService        = vehicleTypeService;
     _carRentInformationService = carRentInformationService;
 }
        public OrderWorkflowService(ILocationService locationService,
                                    IAccountService accountService,
                                    IGeolocService geolocService,
                                    IAppSettings configurationManager,
                                    ILocalization localize,
                                    IBookingService bookingService,
                                    ICacheService cacheService,
                                    IAccountPaymentService accountPaymentService,
                                    INetworkRoamingService networkRoamingService,
                                    IPaymentService paymentService,
                                    ILogger logger,
                                    IPOIProvider poiProvider,
                                    IVehicleTypeService vehicleTypeService,
                                    IDeviceCollectorService deviceCollectorService)
        {
            _cacheService           = cacheService;
            _appSettings            = configurationManager;
            _geolocService          = geolocService;
            _accountService         = accountService;
            _vehicleTypeService     = vehicleTypeService;
            _locationService        = locationService;
            _deviceCollectorService = deviceCollectorService;

            _bookingSettingsSubject = new BehaviorSubject <BookingSettings>(accountService.CurrentAccount.Settings);

            _vehicleTypeSubject = new BehaviorSubject <int?>(
                _appSettings.Data.VehicleTypeSelectionEnabled
                ? accountService.CurrentAccount.Settings.VehicleTypeId
                : null);

            _localize              = localize;
            _bookingService        = bookingService;
            _accountPaymentService = accountPaymentService;
            _networkRoamingService = networkRoamingService;
            _paymentService        = paymentService;
            _logger      = logger;
            _poiProvider = poiProvider;

            _estimatedFareDisplaySubject = new BehaviorSubject <string>(_localize[_appSettings.Data.DestinationIsRequired ? "NoFareTextIfDestinationIsRequired" : "NoFareText"]);

            Observe(_networkRoamingService.GetAndObserveMarketSettings(), marketSettings => MarketChanged(marketSettings).FireAndForget());
            Observe(_vehicleTypeService.GetAndObserveVehiclesList(), vehiclesList => PreselectDefaultVehicleType(vehiclesList));
        }
Example #11
0
 public ServiceFactory(IAuthenticationService authenticationService,
                       IActionTypeService actionTypeService,
                       IBillService billService,
                       ICountryService countryService,
                       ICurrencyService currencyService,
                       IDocumentService documentService,
                       IEmployeeService employeeService,
                       IIssueLogService issueLogService,
                       IIssueService issueService,
                       ILocationService locationService,
                       IMalfunctionGroupService malfunctionGroupService,
                       IMalfunctionService malfunctionService,
                       IMalfunctionSubgroupService malfunctionSubgroupService,
                       IPostService postService,
                       IStateService stateService,
                       ISupplierService supplierService,
                       ITransitionService transitionService,
                       IUserService userService,
                       IVehicleService vehicleService,
                       IVehicleTypeService vehicleTypeService)
 {
     AuthenticationService      = authenticationService;
     ActionTypeService          = actionTypeService;
     BillService                = billService;
     CountryService             = countryService;
     CurrencyService            = currencyService;
     DocumentService            = documentService;
     EmployeeService            = employeeService;
     IssueLogService            = issueLogService;
     IssueService               = issueService;
     LocationService            = locationService;
     MalfunctionGroupService    = malfunctionGroupService;
     MalfunctionService         = malfunctionService;
     MalfunctionSubgroupService = malfunctionSubgroupService;
     PostService                = postService;
     StateService               = stateService;
     SupplierService            = supplierService;
     TransitionService          = transitionService;
     UserService                = userService;
     VehicleService             = vehicleService;
     VehicleTypeService         = vehicleTypeService;
 }
Example #12
0
        public RideSettingsViewModel(IAccountService accountService,
                                     IVehicleTypeService vehicleTypeService,
                                     IPaymentService paymentService,
                                     IAccountPaymentService accountPaymentService,
                                     IOrderWorkflowService orderWorkflowService,
                                     INetworkRoamingService networkRoamingService)
        {
            _vehicleTypeService    = vehicleTypeService;
            _orderWorkflowService  = orderWorkflowService;
            _paymentService        = paymentService;
            _accountPaymentService = accountPaymentService;
            _accountService        = accountService;
            _networkRoamingService = networkRoamingService;

            _payments = new ListItem[0];

            PhoneNumber = new PhoneNumberModel();

            Observe(_accountService.GetAndObservePaymentsList(), paymentTypes => PaymentTypesChanged(paymentTypes).FireAndForget());
        }
 public LoginViewModel(IFacebookService facebookService,
                       ITwitterService twitterService,
                       ILocationService locationService,
                       IAccountService accountService,
                       IPhoneService phoneService,
                       IRegisterWorkflowService registrationService,
                       IPaymentService paymentService,
                       IVehicleTypeService vehicleTypeService,
                       IBookingService bookingService)
 {
     _registrationService = registrationService;
     _facebookService     = facebookService;
     _twitterService      = twitterService;
     _twitterService.ConnectionStatusChanged += HandleTwitterConnectionStatusChanged;
     _locationService    = locationService;
     _accountService     = accountService;
     _phoneService       = phoneService;
     _vehicleTypeService = vehicleTypeService;
     _bookingService     = bookingService;
     _paymentService     = paymentService;
 }
Example #14
0
        public OrderOptionsViewModel(IOrderWorkflowService orderWorkflowService, INetworkRoamingService networkRoamingService, IAccountService accountService, IVehicleService vehicleService, IVehicleTypeService vehicleTypeService)
        {
            _orderWorkflowService  = orderWorkflowService;
            _networkRoamingService = networkRoamingService;
            _accountService        = accountService;
            _vehicleService        = vehicleService;
            _vehicleTypeService    = vehicleTypeService;

            Observe(_orderWorkflowService.GetAndObserveIsDestinationModeOpened(),
                    isDestinationModeOpened => {
                IsDestinationModeOpened = isDestinationModeOpened;
                OnDestinationModeOpened();
            });
            Observe(_orderWorkflowService.GetAndObservePickupAddress(), address => PickupAddress                     = address);
            Observe(_orderWorkflowService.GetAndObserveDestinationAddress(), address => DestinationAddress           = address);
            Observe(_orderWorkflowService.GetAndObserveAddressSelectionMode(), selectionMode => AddressSelectionMode = selectionMode);
            Observe(_orderWorkflowService.GetAndObserveEstimatedFare(), fare => EstimatedFare        = fare);
            Observe(_orderWorkflowService.GetAndObserveLoadingAddress(), loading => IsLoadingAddress = loading);
            Observe(_orderWorkflowService.GetAndObserveVehicleType(), vehicleType => VehicleTypeId   = vehicleType);
            Observe(_vehicleTypeService.GetAndObserveVehiclesList(), vehicleTypes => VehicleTypesChanged(vehicleTypes));
            Observe(_vehicleService.GetAndObserveEta(), eta => Eta = eta);
            Observe(_vehicleService.GetAndObserveAvailableVehicles(), vehicles => _availableVehicles = vehicles);
        }
Example #15
0
 public VehicleTypeController(IVehicleTypeService vehicleTypeService, IIdentityService identityService)
 {
     this._vehicleTypeService = vehicleTypeService;
     this.identityService     = identityService;
 }
Example #16
0
 public CreateModel(IVehicleTypeService vehicleTypeService)
 {
     _vehicleTypeService = vehicleTypeService;
 }
 public VehicleTypeController(IVehicleTypeService VehicleTypeService) :
     base(VehicleTypeService)
 {
 }
Example #18
0
 public IndexModel(IVehicleTypeService vehicleService)
 {
     _vehicleTypeService = vehicleService;
 }
Example #19
0
 public EditModel(IVehicleTypeService vehicleTypeService)
 {
     _vehicleTypeService = vehicleTypeService;
 }
Example #20
0
 public DriverAppService(IDriverService driverService, IMediatorHandler bus, IVehicleTypeService vehicleTypeService)
 {
     _driverService      = driverService;
     _bus                = bus;
     _vehicleTypeService = vehicleTypeService;
 }
Example #21
0
 public VehicleTypeController(IVehicleTypeService vehicleTypeService)
 {
     this._vehicleTypeService = vehicleTypeService;
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="vehicleTypeService"></param>
 /// <param name="log"></param>
 public VehicleController(IVehicleTypeService vehicleTypeService, ILog log)
 {
     this.vehicleTypeService = vehicleTypeService;
     this.log = log;
 }
 public VehicleTypesController(IVehicleTypeService vehicleTypeService)
 {
     _vehicleTypeService = vehicleTypeService;
 }
 public VehicleTypeController(IServiceFactory serviceFactory, IFilterServiceFactory filterServiceFactory)
     : base(filterServiceFactory)
 {
     _vehicleTypeService = serviceFactory.VehicleTypeService;
 }
Example #25
0
 public VehicleController(IVehicleDetailService vehicleDetailService, IVehicleTypeService vehicleTypeService, IBodyTypeService bodyTypeService)
 {
     _vehicleDetailService = vehicleDetailService;
     _vehicleTypeService   = vehicleTypeService;
     _bodyTypeService      = bodyTypeService;
 }
Example #26
0
 public CarController(ICarService carService, IVehicleTypeService vehicleTypeService)
 {
     _carService         = carService;
     _vehicleTypeService = vehicleTypeService;
 }
Example #27
0
 public VehicleController(IVehicleService service, IVehicleTypeService vehicleTypeService)
 {
     this.vehicleService     = service;
     this.vehicleTypeService = vehicleTypeService;
 }
Example #28
0
 public DeleteModel(IVehicleTypeService vehicleTypeService)
 {
     _vehicleTypeService = vehicleTypeService;
 }