/// <summary>Synchronously send the ListUserProperties request</summary> /// <param name="request">Request to be sent</param> /// <returns>Response from the API</returns> public IEnumerable <PropertyInfo> Send(ListUserProperties request) { var task = Task.Run(async() => await SendAsync(request)); var result = task.WaitAndUnwrapException(); return(result); }
/// <summary>Synchronously send the ListUserProperties request</summary> /// <param name="request">Request to be sent</param> /// <returns>Response from the API</returns> public IEnumerable <PropertyInfo> Send(ListUserProperties request) { var task = SendAsync(request); RaiseExceptionOnFault(task); return(task.Result); }
public void TestListUserProperties() { ListUserProperties req; Request req2; IEnumerable <PropertyInfo> resp; // it 'lists properties' req = new ListUserProperties(); resp = client.Send(req); Assert.Equal(2, resp.Count()); }
public async void TestListUserPropertiesAsync() { ListUserProperties req; Request req2; IEnumerable <PropertyInfo> resp; // it 'lists properties' req = new ListUserProperties(); System.Threading.Thread.Sleep(10000); resp = await client.SendAsync(req); Assert.Equal(2, resp.Count()); }
/// <summary>Send the ListUserProperties request</summary> /// <param name="request">Request to be sent</param> /// <returns>Response from the API</returns> public async Task <IEnumerable <PropertyInfo> > SendAsync(ListUserProperties request) { var json = await SendRequestAsync(request).ConfigureAwait(false); return(ParseResponse(json, request)); }
/// <summary>Parse JSON response</summary> /// <param name="json">JSON string from the API</param> /// <param name="request">Request sent to the API</param> /// <returns>Parsed response</returns> protected IEnumerable <PropertyInfo> ParseResponse(string json, ListUserProperties request) { return(JsonConvert.DeserializeObject <PropertyInfo[]>(json)); }
/// <summary>Send the ListUserProperties request</summary> /// <param name="request">Request to be sent</param> /// <returns>Response from the API</returns> public IEnumerable <PropertyInfo> Send(ListUserProperties request) { var json = SendRequest(request); return(ParseResponse(json, request)); }