Esempio n. 1
0
        static async void ConfigureUpdateDataService()
        {
            var documentStoreRepository   = new DocumentStoreRepository();
            var publicTransportRepository = new PublicTransportRepository();

            UpdateDataService.DocumentStoreRepository = documentStoreRepository;

            var delayJsonService = new DelayJsonService(publicTransportRepository);

            DelaysHub.DelayService = new DelayService(delayJsonService);
            DelayService.DocumentStoreRepository = documentStoreRepository;

            var timeService = new DCNC.Service.PublicTransport.Time.TimeService();

            var stopComparer       = new StopComparer();
            var combineHelper      = new CombineHelper(stopComparer);
            var combiner           = new Combiner(combineHelper);
            var combineTripService = new CombineTripService(combiner);

            var joinTripMappingService = new JoinTripMappingService();

            var organizer  = new Organizer();
            var stopHelper = new StopHelper();
            var tripsWithBusStopsService = new TripsWithBusStopsService(organizer, stopHelper);
            var joiner = new Joiner(combineTripService, joinTripMappingService, tripsWithBusStopsService);

            var grouper = new Grouper();

            var tripService         = new TripService(documentStoreRepository, publicTransportRepository);
            var busStopService      = new BusStopService(documentStoreRepository, publicTransportRepository);
            var busLineService      = new BusLineService(documentStoreRepository, publicTransportRepository);
            var expeditionService   = new ExpeditionService(documentStoreRepository, publicTransportRepository);
            var stopInTripService   = new StopInTripService(documentStoreRepository, publicTransportRepository);
            var busStopModelService = new BusStopModelService();

            var updateServiceHelper = new UpdateServiceHelper(joiner, grouper, timeService, tripService, busStopService,
                                                              busLineService, expeditionService, stopInTripService, busStopModelService, documentStoreRepository);

            documentStoreRepository.DeleteAllTimeTableJsons();
            await UpdateDataService.Init(timeService, updateServiceHelper);

            ConfigureServices(documentStoreRepository, publicTransportRepository);
        }
Esempio n. 2
0
 public DelayService(DelayJsonService delayJsonService)
 {
     _delayJsonService = delayJsonService;
 }