Exemple #1
0
        public async Task SearchForLocation(string searchValue)
        {
            await ExecuteCommand(async() =>
            {
                LocationInfos.Clear();

                var items         = await WeatherApiClient.SearchLocation(searchValue);
                var locationInfos = items.ToList();

                if (items.ToList().Count == 0)
                {
                    return;
                }

                foreach (var locationInfo in locationInfos)
                {
                    LocationInfos.Add(locationInfo);
                }
            });
        }