Ejemplo n.º 1
0
 public LocationInfo GetLocationInfo()
 {
     if (Resolver == null)
     {
         return(Location as LocationInfo);
     }
     return(Resolver.ResolveLocation(Location));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Try to resolve location query, if it was successful, create forecastviewmodel for each forecast downloader and inject that forecast downloader through constructor
        /// </summary>
        private async void InitializeForecastsDownloads()
        {
            //resolve location query into coordinates
            var coordinates = await locationResolver.ResolveLocation(LocationQuery);

            //check if resolving was successful
            if (coordinates.Latitude is null || coordinates.Latitude is null)
            {
                return;
            }
            //clean forecastcollection
            ForecastsCollection = new ObservableCollection <IForecastViewModel>();
            //create forecastviewmodel for each forecast downloader and inject that downloader
            foreach (var forecastDownloader in forecastDownloaders)
            {
                forecastsCollection.Add(new ForecastViewModel(forecastDownloader, coordinates));
            }
        }
Ejemplo n.º 3
0
 public LocationInfo GetLocationInfo(IProjectEntry project)
 {
     return(Resolver.ResolveLocation(project, Location));
 }
Ejemplo n.º 4
0
 public LocationInfo GetLocationInfo()
 {
     return(Resolver.ResolveLocation(Location));
 }