public MapViewModel(INavigationService navigationService, IDataService dataService, IGeolocationProvider geolocationProvider) { this.navigationService = navigationService; this.dataService = dataService; this.geolocationProvider = geolocationProvider; this.Cafes = new ObservableCollection<CafeSummaryViewModel>(); this.NearbyCafes = new ObservableCollection<CafeSummaryViewModel>(); this.CurrentLocation = new ObservableCoordinate(); this.Centre = new ObservableCoordinate { Latitude = 51.5214859, Longitude = -0.1072635 }; this.RecentreAtCurrentLocation = new RelayCommand(() => { if (this.CurrentLocation == null) return; this.Centre = this.CurrentLocation; this.RaisePropertyChanged(() => this.Centre); }, () => this.CurrentLocation != null); this.SelectCafe = new RelayCommand<CafeSummaryViewModel>(cafe => { this.SelectedCafe = cafe; }); #if DEBUG if (this.IsInDesignMode) { this.OnNavigatedTo(new Dictionary<string, object>()); } #endif }
public static IGeolocationResult GetLocationFromIp(IPAddress IpAddress) { IGeolocationProvider provider = GetProvider(); if (provider == null) { // We have no way to convert IP to lat/long. Debug.WriteLine("GeoLocationHelper.GetProvider(): Pulse requires a Geolocation Provider in order to function. Please install the MaxMind Geolocation Provider for Episerver."); return(null); } return(provider.Lookup(IpAddress)); }
public ListViewModel(IDataService dataService, INavigationService navigationService, IGeolocationProvider geolocationProvider) { this.dataService = dataService; this.navigationService = navigationService; this.geolocationProvider = geolocationProvider; this.BestCafes = new ObservableCollection<CafeSummaryViewModel>(); this.NearbyCafes = new ObservableCollection<CafeSummaryViewModel>(); this.ShowMap = new RelayCommand(this.OnShowMapExecuted); #if DEBUG if (this.IsInDesignMode) { this.OnNavigatedTo(); } #endif }
public ListViewModel(IDataService dataService, IBookmarkService bookmarkService, INavigationService navigationService, IGeolocationProvider geolocationProvider) { this.dataService = dataService; this.bookmarkService = bookmarkService; this.navigationService = navigationService; this.geolocationProvider = geolocationProvider; this.BestCafes = new ObservableCollection <CafeSummaryViewModel>(); this.NearbyCafes = new ObservableCollection <CafeSummaryViewModel>(); this.BookmarkedCafes = new ObservableCollection <CafeSummaryViewModel>(); this.ShowMap = new RelayCommand(this.OnShowMapExecuted); #if DEBUG if (this.IsInDesignMode) { this.OnNavigatedTo(); } #endif }
public MapViewModel(INavigationService navigationService, IDataService dataService, IGeolocationProvider geolocationProvider) { this.navigationService = navigationService; this.dataService = dataService; this.geolocationProvider = geolocationProvider; this.Cafes = new ObservableCollection <CafeSummaryViewModel>(); this.NearbyCafes = new ObservableCollection <CafeSummaryViewModel>(); this.CurrentLocation = new ObservableCoordinate(); this.Centre = new ObservableCoordinate { Latitude = 51.5214859, Longitude = -0.1072635 }; this.RecentreAtCurrentLocation = new RelayCommand(() => { if (this.CurrentLocation == null) { return; } this.Centre = this.CurrentLocation; this.RaisePropertyChanged(() => this.Centre); }, () => this.CurrentLocation != null); this.SelectCafe = new RelayCommand <CafeSummaryViewModel>(cafe => { this.SelectedCafe = cafe; }); #if DEBUG if (this.IsInDesignMode) { this.OnNavigatedTo(new Dictionary <string, object>()); } #endif }
public GeolocationService(ILanguageBranchRepository languageBranchRepository, IGeolocationProvider geolocationProvider) { _languageBranchRepository = languageBranchRepository; _enabledLanguageBranches = _languageBranchRepository.ListEnabled().OrderBy(x => x.SortIndex).ToList(); _geolocationProvider = geolocationProvider; }
public VisitorLocationPageController(IGeolocationProvider geolocationProvider) { this.geolocationProvider = geolocationProvider; }
public TaskGeolocationEnricher(IGeolocationProvider geolocationProvider) : base(geolocationProvider) { }
public GeolocationEnricher(IGeolocationProvider geolocationProvider) => this.geolocationProvider = geolocationProvider;