Esempio n. 1
0
        public DataResolver(IRepoManager repoManager, IStopResolver stopResolver)
        {
            _repoManager  = repoManager ?? throw new ArgumentNullException(nameof(repoManager));
            _stopResolver = stopResolver ?? throw new ArgumentNullException(nameof(stopResolver));

            _positionEntryRepository = _repoManager.PositionEntryRepository;
            _trackEntryRepository    = _repoManager.TrackEntryRepository;
            _stopVisitRepository     = _repoManager.StopVisitRepository;
            _stopRepository          = _repoManager.StopRepository;

            _accuracy = 10000;
        }
Esempio n. 2
0
        public List <StopVisit> StopsBetween(DateTimeOffset begin, DateTimeOffset end)
        {
            IStopVisitRepository svRepo = _repoManager.StopVisitRepository;
            IStopRepository      sRepo  = _repoManager.StopRepository;

            var visits = svRepo.BetweenDates(begin, end).ToList();

            foreach (StopVisit v in visits)
            {
                v.Stop = sRepo.Get(v.StopId);
            }

            return(visits);
        }