public DashboardController(IGroupService groupService, IStopService stopService, TenantContext tenantContext) { this.groupService = groupService; this.stopService = stopService; this.tenantContext = tenantContext; }
public GenerateCpraReport(IStopCosmosDbService stopCosmosDbService, IStopService stopService) { _storageConnectionString = Environment.GetEnvironmentVariable("RipaStorage"); _storageContainerNamePrefix = "cpra"; _blobContainerClient = GetBlobContainerClient(); _stopCosmosDbService = stopCosmosDbService; _stopService = stopService; }
public TenantSettingsController(IUserService userService, IStopService stopService, ITenantService tenantService, TenantContext tenantContext) { this.stopService = stopService; this.tenantService = tenantService; this.userService = userService; this.tenantContext = tenantContext; }
public GroupsController(IGroupService groupService, IUserService userService, IStopService stopService, ITenantService tenantService, TenantContext tenantContext) { this.groupService = groupService; this.stopService = stopService; this.tenantService = tenantService; this.userService = userService; this.tenantContext = tenantContext; }
public DvbTelegramBot(IConfiguration config, CloudTable favoriteStopTable) { _stopService = new StopService(); _favoriteStopService = new FavoriteStopService(new FavoriteStopRepository(favoriteStopTable, new StopRepository())); var token = config["TelegramBotToken"]; var botClient = new TelegramBotClient(token); _sendMessageService = new SendMessageService(botClient); }
public TimersSubmissionConsumer(IStopCosmosDbService stopCosmosDbService, ISftpService sftpService, IStopService stopService, ISubmissionServiceBusService submissionServiceBusService) { _stopCosmosDbService = stopCosmosDbService; _sftpService = sftpService; _stopService = stopService; _submissionServiceBusService = submissionServiceBusService; _storageConnectionString = Environment.GetEnvironmentVariable("RipaStorage"); _storageContainerNamePrefix = Environment.GetEnvironmentVariable("ContainerPrefixSubmissions"); _sftpInputPath = Environment.GetEnvironmentVariable("SftpInputPath"); _blobContainerClient = GetBlobContainerClient(); }
public PostSubmitSearch(ISftpService sftpService, IStopService stopService, ISubmissionCosmosDbService submissionCosmosDbService, IStopCosmosDbService stopCosmosDbService, IUserProfileCosmosDbService userProfileCosmosDbService, ISubmissionServiceBusService submissionServiceBusService) { _sftpService = sftpService; _stopService = stopService; _submissionCosmosDbService = submissionCosmosDbService; _stopCosmosDbService = stopCosmosDbService; _userProfileCosmosDbService = userProfileCosmosDbService; _sftpInputPath = Environment.GetEnvironmentVariable("SftpInputPath"); _storageConnectionString = Environment.GetEnvironmentVariable("RipaStorage"); _storageContainerNamePrefix = Environment.GetEnvironmentVariable("ContainerPrefixSubmissions"); _submissionServiceBusService = submissionServiceBusService; }
public SearchAddressViewModel() { stopService = (App.Current as App).Container.GetService <IStopService>(); // New up our observable collection AddressesFound = new ObservableCollection <StringWrapper>(); SearchCommand = new RelayCommand(async() => { // If our button is showing "search", let's do the following if (SearchAddButtonText == "Search") { // Reset everything AddressesFound.Clear(); AddressSelected = new StringWrapper(); MapLocationFinderResult result = await MapLocationFinder.FindLocationsAsync(BuildingNumber + " " + StreetName + ", " + PostCode, null); if (result.Status == MapLocationFinderStatus.Success) { MapAddress address = result.Locations.FirstOrDefault().Address; Geopoint point = result.Locations.FirstOrDefault().Point; var stringw = new StringWrapper { StringContent = address.FormattedAddress, TempLatitude = Convert.ToDecimal(point.Position.Latitude), TempLongitude = Convert.ToDecimal(point.Position.Longitude) }; AddressesFound.Add(stringw); } else { return; } } else // it's basically showing "Add" at this point, so add our item to the list of stops { StopModel stopModel = new StopModel() { Name = StopName, Address = AddressSelected.StringContent, Latitude = AddressSelected.TempLatitude, Longitude = AddressSelected.TempLongitude }; stopService.AddStop(stopModel); } }); }
public NewRouteConfirmationViewModel() { routeService = (App.Current as App).Container.GetService <IRouteService>(); stopService = (App.Current as App).Container.GetService <IStopService>(); CreateRouteCommand = new RelayCommand(() => { List <DateTime> datesForRoute = GetDatesSetForRoute(); if (!string.IsNullOrEmpty(RouteName) && stopService.Stops.Count > 0 && datesForRoute.Count > 0) { RouteModel routeToAdd = new RouteModel() { RouteName = this.RouteName, Stops = new System.Collections.ObjectModel.ObservableCollection <StopModel>(stopService.Stops), DatesForCurrentRoute = new List <DateTime>(datesForRoute) }; // Add route to list of routes routeService.AddRoute(routeToAdd); // Cleanup CleanupRouteCreation(); // Navigate to route page NavigationService.Navigate(typeof(RoutesPage)); } }); DateChangedCommand = new RelayCommand <CalendarDatePicker>((param) => { selectedDate = param.Date; }); }
public StopController(IStopService stops) { _stops = stops; }
public StopCacheService(IStopService stopService) { _stopService = stopService; }
public BroadcastController(IGroupService groupService, IStopService stopService, TenantContext tenantContext) { this.stopService = stopService; this.tenantContext = tenantContext; }
public ServiceBusResultConsumer(IStopCosmosDbService stopCosmosDbService, IStopService stopService) { _stopCosmosDbService = stopCosmosDbService; _stopService = stopService; }
public Form1() { InitializeComponent(); _stopService = new StopService(); _passageService = new PassageService(); }
public ShowDeparturesCommand(ISendMessageService sendMessageService, IStopService stopService, IFavoriteStopService favoriteStopService) { _sendMessageService = sendMessageService; _stopService = stopService; _favoriteStopService = favoriteStopService; }
public RoutesNewViewModel() { stopService = (App.Current as App).Container.GetService <IStopService>(); mapService = (App.Current as App).Container.GetService <IMapService>(); Stops.CollectionChanged += Stops_CollectionChanged; Center = new Geopoint(defaultPosition); MapLoaded = new RelayCommand <object>((param) => { MapControl newMap = param as MapControl; Map = newMap; }); NewStopCommand = new RelayCommand(async() => { await new SearchAddressDialog().ShowAsync(); }); RemoveStopCommand = new RelayCommand <object>((param) => { // will need to find out what's wrong with this binding at some point object stopModel = (param as Grid).DataContext as object; stopService.RemoveStop(stopModel); }); SaveRouteCommand = new RelayCommand(async() => { await new NewRouteConfirmation().ShowAsync(); }); SwitchStopUpCommand = new RelayCommand(() => { // We are running a switch command isSwitchCommandRunning = true; // Find index of selected item in stops var indexOfStop = stopService.RetrieveIndexOfStop(SelectedStop as object); // if index is 0, do nothing if (indexOfStop == 0) { return; } // Temp model object var tempStopToReinsert = SelectedStop.Clone(); // Remove item from collection and reinsert at desired index (-1) stopService.RemoveStop(SelectedStop); // SelectedStop becomes null at this point, so let's use the // copy we made to reinsert stopService.AddStopAtIndex(tempStopToReinsert, indexOfStop - 1); // We've reached the end of the switch command isSwitchCommandRunning = false; }); SwitchStopDownCommand = new RelayCommand(() => { // We are running a switch command isSwitchCommandRunning = true; // Find index of selected item in stops var indexOfStop = stopService.RetrieveIndexOfStop(SelectedStop as object); // if index is the last index, do nothing if (indexOfStop == stopService.Stops.Count - 1) { return; } // Temp model object var tempStopToReinsert = SelectedStop.Clone(); // Remove item from collection and reinsert at desired index (+1) stopService.RemoveStop(SelectedStop); // SelectedStop becomes null at this point, so let's use the // copy we made to reinsert stopService.AddStopAtIndex(tempStopToReinsert, indexOfStop + 1); // We've reached the end of the switch command isSwitchCommandRunning = false; }); }
public AutocompleteService(IStopService stopService) { this.stopService = stopService; }
public StopsController(IStopService stopService) { _stopService = stopService; }
public StopsController(IStopService stopService) { _stopService = stopService ?? throw new ArgumentNullException(nameof(stopService)); }