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