Exemplo n.º 1
0
        public async Task <IRestResponse> requestConversion(IConverterRequest converterRequest)
        {
            var restRequest = new RestRequest(_convertUri, Method.POST);

            restRequest.AddJsonBody(converterRequest);
            return(await _restClient.ExecuteAsync(restRequest).ConfigureAwait(false));
        }
 public async Task <IConverterResult> convert(IConverterRequest converterRequest)
 {
     return(JsonSerializer.Deserialize <ConverterResult>(_converterAPI.requestConversion(converterRequest).Result.Content));
 }
Exemplo n.º 3
0
 public async Task <IConverterResult> Convert(IConverterRequest convertRequest)
 {
     convertRequest.validate();
     return(await Convert(convertRequest.getFromType(), convertRequest.fromValue, convertRequest.getToType()).ConfigureAwait(false));
 }