Exemplo n.º 1
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);
        }
 public MinuteTimeTableService(MinuteTimeTableBuilder minuteTimeTableBuilder, IDocumentStoreRepository documentStoreRepository)
 {
     _minuteTimeTableBuilder  = minuteTimeTableBuilder;
     _documentStoreRepository = documentStoreRepository;
 }