示例#1
0
 /// <summary>Initializes a new instance of the <see cref="JobService"/> class.</summary>
 /// <param name="repository">The repository.</param>
 /// <param name="cacheManager">The cache manager.</param>
 /// <param name="routeStopService">The route stop service.</param>
 /// <param name="stopActionService">The stop action service.</param>
 public JobService(IRepository <Job> repository, ICacheManager cacheManager, IRouteStopService routeStopService, IStopActionService stopActionService, IJobGroupService jobGroupService, IDateTimeHelper dateTimeHelper, ILocationDistanceService locationDistanceService)
     : base(repository, cacheManager)
 {
     _routeStopService        = routeStopService;
     _stopActionService       = stopActionService;
     _jobGroupService         = jobGroupService;
     _dateTimeHelper          = dateTimeHelper;
     _locationDistanceService = locationDistanceService;
 }
        public void SetUp()
        {
            Kernel.Bind <IEngine>().To <Engine>().InSingletonScope();

            // Run installation tasks
            Kernel.Bind(x =>
                        x.FromAssemblyContaining <StateService>()
                        .SelectAllClasses()
                        .BindAllInterfaces()
                        .Configure(f => f.InTransientScope()));

            // Bind Database Repository
            Kernel.Rebind(typeof(IRepository <>)).To(typeof(EfRepository <>));

            Kernel.Bind <IDbContext>().To <DataContext>().InSingletonScope()
            .WithConstructorArgument("nameOrConnectionString", ConnectionStringManager.ConnectionString);

            Kernel.Bind <IIncluder>().To <DbIncluder>().InTransientScope();

            Kernel.Rebind <ICacheManager>().To <MemoryCacheManager>().InThreadScope();

            Kernel.Rebind <ILogService>().To <LogService>().InThreadScope();

            _jobGroupService = Kernel.Get <IJobGroupService>();

            _chassisService        = Kernel.Get <IChassisService>();
            _containerOwnerService = Kernel.Get <IContainerOwnerService>();
            _containerService      = Kernel.Get <IContainerService>();
            _stopActionService     = Kernel.Get <IStopActionService>();

            _subscriberService = Kernel.Get <ISubscriberService>();

            _driverService           = Kernel.Get <IDriverService>();
            _vehicleService          = Kernel.Get <IVehicleService>();
            _userService             = Kernel.Get <IUserService>();
            _stateService            = Kernel.Get <IStateService>();
            _locationService         = Kernel.Get <ILocationService>();
            _locationDistanceService = Kernel.Get <ILocationDistanceService>();

            Kernel.Rebind <IDomainModelMapper>().To <DomainModelAutoMapper>().InThreadScope();
            _mappingService = Kernel.Get <IDomainModelMapper>();

            _jobService           = Kernel.Get <IJobService>();
            _routeStopService     = Kernel.Get <IRouteStopService>();
            _locationGroupService = Kernel.Get <ILocationGroupService>();
            _weatherCityService   = Kernel.Get <IWeatherCityService>();

            AutoMapperInitializer.Initialize();
        }
 public LegacyImportService(ILocationService locationService, IStopActionService stopActionService, IJobService jobService, IRouteStopService routeStopService, IGeocodeService geocodeService, IJobGroupService jobGroupService, IDriverService driverService, ISyncLogEntryService syncLogEntryService, IDistanceService distanceService)
 {
     _locationService     = locationService;
     _stopActionService   = stopActionService;
     _jobService          = jobService;
     _routeStopService    = routeStopService;
     _geocodeService      = geocodeService;
     _jobGroupService     = jobGroupService;
     _driverService       = driverService;
     _syncLogEntryService = syncLogEntryService;
     _distanceService     = distanceService;
     _validationService   = new ValidationService(
         new[]
     {
         new TimeSpan(11, 11, 0)
     }
         );
 }
示例#4
0
 public JobGroupController(ILoginInfo loginInfo, IJobGroupService JobGroupService)
 {
     _service = JobGroupService;
 }
示例#5
0
 public ImportJobResult(Dictionary <string, ManifestLegs> legsByManifestNumber, IGeocodeService geocodeService, IJobGroupService jobGroupService)
 {
     _dictionary      = legsByManifestNumber;
     _geocodeService  = geocodeService;
     _jobGroupService = jobGroupService;
 }
示例#6
0
 public ImportJobResult(IList <ImportedLeg> jobs, IGeocodeService geocodeService, IJobGroupService jobGroupService)
 {
     _geocodeService  = geocodeService;
     _jobGroupService = jobGroupService;
     Set(jobs);
 }