Esempio n. 1
0
        public async Task <IDataSourcePlugin> GetDataSourceDataAsync(NameValueCollection locations)
        {
            this.WriteDebug("Will now try refresh using YR.no");
            var pathname    = locations["raw"];
            var forecastUrl = this.getYrForeCastURL(pathname);

            try
            {
                var    client      = new HttpClient();
                string urlContents = await client.GetStringAsync(forecastUrl);

                this.weatherData = this.deserializeWeatherData(urlContents);
            }
            catch (Exception err)
            {
                this.WriteDebug($"got error in fetching xmldata from {forecastUrl}: {err.Message}");
                throw;
            }

            return(this);
        }
Esempio n. 2
0
 private void LoadLevel(Weatherdata weather)
 {
     SceneManager.LoadScene("FinalMainScene");
 }