public Task <AccountObjects> AccountObjects(AccountObjectsRequest request) { var command = JsonConvert.SerializeObject(request, serializerSettings); TaskCompletionSource <AccountObjects> task = new TaskCompletionSource <AccountObjects>(); TaskInfo taskInfo = new TaskInfo(); taskInfo.TaskId = request.Id; taskInfo.TaskCompletionResult = task; taskInfo.Type = typeof(AccountObjects); tasks.TryAdd(request.Id, taskInfo); client.SendMessage(command); return(task.Task); }
public void AccountObjects() { // Arrange var request = new AccountObjectsRequest(); request.Params.Add(new AccountObjectsRequestParams { Account = "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", LedgerIndex = LedgerIndex.Validated.ToLower(), Limit = 10, Type = LedgerNodeType.State.ToLower() }); // Act var response = _client.AccountInformation.AccountObjectsAsync(request).Result; // Assert Assert.AreEqual(Status.Success, response.Result.Status); }
public Task <AccountObjects> AccountObjects(string account) { AccountObjectsRequest request = new AccountObjectsRequest(account); return(AccountObjects(request)); }
public async Task <RpcJsonResponse <AccountObjectsResult> > AccountObjectsAsync(AccountObjectsRequest request) { return(await PostAsync <RpcJsonResponse <AccountObjectsResult>, AccountObjectsResult>(request)); }