Пример #1
0
 private static async Task <GetPvPowerForecastsResponse> PowerForecastAsync(Location location)
 {
     using (var client = new SolcastClient())
     {
         return(await client.GetPvPowerForecastsAsync(location));
     }
 }
Пример #2
0
        public void TestPowerForecast()
        {
            var location = Places.Sydney();

            Debug.WriteLine(location.Dump());
            Task.Run(async() =>
            {
                using (var client = new SolcastClient())
                {
                    var results = await client.GetPvPowerForecastsAsync(location);
                    Assert.NotNull(results);
                    Assert.NotNull(results.Forecasts);
                    Assert.True(results.Forecasts.Count == ForecastDefault.Count);
                }
            }).Wait();
        }