public override async Task <Unit> Handle ( FetchWeatherForecastsAction aFetchWeatherForecastsAction, CancellationToken aCancellationToken ) { var getWeatherForecastsRequest = new GetWeatherForecastsRequest { Days = 10 }; GetWeatherForecastsResponse getWeatherForecastsResponse = await WebApiService.GetResponse <GetWeatherForecastsResponse>(getWeatherForecastsRequest) .ConfigureAwait(false); WeatherForecastsState._WeatherForecasts = getWeatherForecastsResponse.WeatherForecasts; return(Unit.Value); }
public override async Task <Unit> Handle ( FetchWeatherForecastsAction aFetchWeatherForecastsAction, CancellationToken aCancellationToken ) { var getWeatherForecastsRequest = new GetWeatherForecastsRequest { Days = 10 }; GetWeatherForecastsResponse getWeatherForecastsResponse = await HttpClient.GetFromJsonAsync <GetWeatherForecastsResponse> ( getWeatherForecastsRequest.GetRoute(), aCancellationToken ) .ConfigureAwait(false); WeatherForecastsState._WeatherForecasts = getWeatherForecastsResponse.WeatherForecasts; return(Unit.Value); }