コード例 #1
0
 public UserLocationController()
 {
     client          = new HttpClient();
     apiService      = new APIService(client);
     distanceService = new DistanceService();
     userService     = new UserService(distanceService);
 }
コード例 #2
0
 public RouteStopService(IDistanceService distanceService, OptimizerConfiguration configuration, IRouteStopDelayService routeStopDelayService, IJobNodeService jobNodeService)
 {
     _distanceService       = distanceService;
     _configuration         = configuration;
     _routeStopDelayService = routeStopDelayService;
     _jobNodeService        = jobNodeService;
 }
コード例 #3
0
        public ParksLocatorService(IParksLocatorRepository parksLocatorRepository,
                                   IGoogleApiClient googleApiClient,
                                   IDistanceService distanceService)

        {
            _googleApiClient        = googleApiClient;
            _parksLocatorRepository = parksLocatorRepository;
            _distanceService        = distanceService;
        }
コード例 #4
0
 public FlightService(
     IFlightsRepository flightsRepository,
     IMappingService mappingService,
     IDistanceService distanceService,
     IFlightInformationService flightInformationService)
 {
     _flightsRepository        = flightsRepository;
     _mappingService           = mappingService;
     _distanceService          = distanceService;
     _flightInformationService = flightInformationService;
 }
コード例 #5
0
        public MapForm(ITrackerService trackerService, IMapService mapService, IAPIMapperService converter, IDistanceService distanceService, ISpeedService speedService)
        {
            InitializeComponent();

            this.trackerService              = trackerService;
            this.mapService                  = mapService;
            this.converter                   = converter;
            this.distanceService             = distanceService;
            this.speedService                = speedService;
            this.mapService.PositionUpdated += MapService_PositionUpdated;
        }
コード例 #6
0
 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)
     }
         );
 }
コード例 #7
0
 public DistanceController(IDistanceService distanceService, ILogger <DistanceController> logger)
     : base(distanceService, logger)
 {
     _distanceService = distanceService;
     _logger          = logger;
 }
コード例 #8
0
        public MeasureController(IDistanceService distanceService)
        {
            Ensure.That(distanceService).IsNotNull();

            _distanceService = distanceService;
        }
コード例 #9
0
 public DistanceController(IDistanceService distanceService, IMapper mapper, IHttpContextAccessor httpContextAccessor)
 {
     _distanceService = distanceService;
     _mapper          = mapper;
     _caller          = httpContextAccessor.HttpContext.User;
 }
コード例 #10
0
 public UserService(IDistanceService distanceService)
 {
     this.distanceService = distanceService;
 }
コード例 #11
0
 public DistanceController(IDistanceService distanceService, IGraphService graphService, ILogger <DistanceController> logger)
 {
     _distanceService = distanceService;
     _graphService    = graphService;
     _logger          = logger;
 }
コード例 #12
0
 public DistanceServiceTests()
 {
     _service = new DistanceService.Application.Services.DistanceService();
 }
コード例 #13
0
 public GetDistanceBetweenAirportsQueryHandler(IAirportService airportService,
                                               IDistanceService distanceService)
 {
     _airportService  = airportService ?? throw new ArgumentNullException(nameof(airportService));
     _distanceService = distanceService ?? throw new ArgumentNullException(nameof(distanceService));
 }
コード例 #14
0
 public DistanceController(IPointRepository pointRepository, IDistanceService distanceService)
 {
     this.pointRepository = pointRepository;
     this.distanceService = distanceService;
 }
コード例 #15
0
 public DistanceController(IDistanceService distanceService, IMapper mapper)
 {
     _distanceService = distanceService;
     _mapper          = mapper;
 }
コード例 #16
0
 public CachedDistanceService(IDistanceService distanceService)
 {
     _distanceService = distanceService;
     _dictionary      = new ConcurrentDictionary <int, TripLength>();
 }
コード例 #17
0
 public DistanceController(IDistanceService distanceService)
 {
     this._distanceService = distanceService;
 }
コード例 #18
0
 public DistanceController(IDistanceService distanceService) => _distanceService = distanceService;
コード例 #19
0
 public JobNodeService(IDistanceService distanceService)
 {
     _distanceService = distanceService;
 }
コード例 #20
0
 public SuperDistanceService(IMapperService mapperService, ILocationDistanceService locationDistanceService, IDistanceService fallbackDistanceService)
 {
     _mapperService           = mapperService;
     _locationDistanceService = locationDistanceService;
     _fallbackDistanceService = fallbackDistanceService;
 }
コード例 #21
0
        /// <summary>
        /// Validates Job based on RouteStops
        /// </summary>
        /// <param name="job"></param>
        /// <returns></returns>
        public ValidationResult ValidateJob(PAI.FRATIS.SFL.Domain.Orders.Job job, bool validateLocations, IDistanceService distanceService)
        {
            var optimizationJob = new Drayage.Optimization.Model.Orders.Job();

            try
            {
                job.RouteStops = job.RouteStops.OrderBy(p => p.SortOrder).ToList();

                _mapDomainService.MapDomainToModel(job, optimizationJob, null);
            }
            catch (Exception ex)
            {
                return(new ValidationResult()
                {
                    Successful = false,
                    Errors = new List <string>()
                    {
                        "Invalid Route Stop"
                    }
                });
            }

            var result = _validationService.ValidateJob(optimizationJob, validateLocations, distanceService);

            try
            {
                return(new ValidationResult()
                {
                    Successful = result.Successful, Errors = result.Errors
                });
            }
            catch (Exception ex)
            {
                throw new Exception("Could not map ValidationResult using Automapper - verify AutoMapper profile loaded and configured correctly", ex);
            }
        }