public User Send(GetUserValues request) { var task = Task.Run(async() => await SendAsync(request)); var result = task.WaitAndUnwrapException(); return(result); }
public User Send(GetUserValues request) { var task = SendAsync(request); RaiseExceptionOnFault(task); return(task.Result); }
public async void TestGetUserValuesAsync() { GetUserValues req = new GetUserValues("entity_id"); User resp = await client.SendAsync(req); Assert.Equal((long)42, (long)resp.Values["int_property"]); Assert.Equal("hello", resp.Values["str_property"]); }
private User ParseResponse(string json, GetUserValues request) { var vals = JsonConvert.DeserializeObject <Dictionary <string, object> >(json); return(new User(request.UserId, vals)); }
public async Task <User> SendAsync(GetUserValues request) { var json = await SendRequestAsync(request).ConfigureAwait(false); return(ParseResponse(json, request)); }
public User Send(GetUserValues request) { var json = SendRequest(request); return(ParseResponse(json, request)); }