public PersistLocations(IServiceScopeFactory scopeFactory, BusLocationsProvider busLocationsProvider) { _scopeFactory = scopeFactory; _busLocationsProvider = busLocationsProvider; _latest = new Dictionary <string, VehicleLocation>(); // unsubscriber = _busLocationsProvider.Subscribe(this); }
public BroadcastLocations(IHubContext <BusHub> hubContext, BusLocationsProvider busLocationsProvider, IRouteColourService routeColourService) { _hubContext = hubContext; _busLocationsProvider = busLocationsProvider; _routeColourService = routeColourService; _latest = new Dictionary <string, VehicleLocation>(); // unsubscriber = _busLocationsProvider.Subscribe(this); }