public UpdateServiceHelper(Joiner joiner, Grouper grouper, TimeService timeService, IJsonDataService tripService, IJsonDataService busStopService, IJsonDataService busLineService, IJsonDataService expeditionService, IJsonDataService stopInTripService, BusStopModelService busStopModelService, IDocumentStoreRepository documentStoreRepository) { _joiner = joiner; _grouper = grouper; _timeService = timeService; _tripService = tripService; _busStopService = busStopService; _busLineService = busLineService; _expeditionService = expeditionService; _stopInTripService = stopInTripService; _busStopModelService = busStopModelService; _documentStoreRepository = documentStoreRepository; }
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); }