示例#1
0
            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);
            }
示例#2
0
 public async Task <TResponse> GetResponse <TResponse>(IApiRequest aApiRequest) =>
 await WebApiService.GetResponse <TResponse>(aApiRequest);