public async Task <IEnumerable <WeatherForecast> > GetAsync()
 {
     return(await Task.Run(() =>
     {
         // Simulate an optimized 20ms latency
         Task.Delay(TimeSpan.FromMilliseconds(20));
         return WeatherForecastFixture.GetFiveDayForecastAsync();
     }));
 }
Ejemplo n.º 2
0
 public IEnumerable <WeatherForecast> Get()
 {
     // Simulate an optimized 20ms latency
     Thread.Sleep(TimeSpan.FromMilliseconds(20));
     return(WeatherForecastFixture.GetFiveDayForecast());
 }