Пример #1
0
        public static async void Init(TimeTableService timeTableService, MinuteTimeTableService minuteTimeTableService)
        {
            _timeTableService       = timeTableService;
            _minuteTimeTableService = minuteTimeTableService;

            await _timeTableService.SetTimeTables();

            _minuteTimeTableService.SetMinuteTimeTables();

            SetTimer();
        }
Пример #2
0
        static void ConfigureServices(IDocumentStoreRepository documentStoreRepository, IPublicTransportRepository publicTransportRepository)
        {
            var converter         = new Converter();
            var filterHelper      = new FilterHelper();
            var helperTimeService = new TimeService();
            var convertingHelper  = new ConvertingHelper(converter, filterHelper, documentStoreRepository);
            var stopTimesService  = new StopTimesService(documentStoreRepository, publicTransportRepository);
            var downloadHelper    = new DownloadHelper(documentStoreRepository, helperTimeService, publicTransportRepository);
            var timeTableService  = new TimeTableService(documentStoreRepository, helperTimeService, convertingHelper, stopTimesService, downloadHelper);

            var polandPublicHoliday    = new PolandPublicHoliday();
            var dateChecker            = new DateChecker(polandPublicHoliday);
            var stopTimesFetcher       = new StopTimesFetcher(dateChecker, documentStoreRepository);
            var minuteTimeTableBuilder = new MinuteTimeTableBuilder(stopTimesFetcher);
            var minuteTimeTableService = new MinuteTimeTableService(minuteTimeTableBuilder, documentStoreRepository);

            UpdateTimeTableService.Init(timeTableService, minuteTimeTableService);
        }