Exemplo n.º 1
0
        public SendCommand(IRippleRestClient client, IAccountAndSecretProvider defaultAccountAndSecretProvider)
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }

            this.client = client;
            this.defaultAccountAndSecretProvider = defaultAccountAndSecretProvider;
        }
 public static GetAccountBalancesResponse GetAccountBalances(this IRippleRestClient client, string account)
 {
     try
     {
         return(Task.Run <GetAccountBalancesResponse>(async() => await client.GetAccountBalancesAsync(account)).Result);
     } catch (AggregateException e)
     {
         ExceptionDispatchInfo.Capture(e.InnerException).Throw();
         return(null);
     }
 }
 public static PreparePaymentResponse PreparePayment(this IRippleRestClient client, string address, string destinationAccount, Amount destinationAmount)
 {
     try
     {
         return(Task.Run <PreparePaymentResponse>(async() => await client.PreparePaymentAsync(address, destinationAccount, destinationAmount)).Result);
     }
     catch (AggregateException e)
     {
         ExceptionDispatchInfo.Capture(e.InnerException).Throw();
         return(null);
     }
 }
 public GetAccountSettingsCommand(IRippleRestClient client, IAccountProvider defaultAccountProvider)
 {
     this.client = client;
     this.defaultAccountProvider = defaultAccountProvider;
 }
Exemplo n.º 5
0
 public GetTransactionsCommand(IRippleRestClient client, IAccountProvider defaultAccountProvider)
 {
     this.client = client;
     this.defaultAccountProvider = defaultAccountProvider;
 }
 public static SubmitPaymentAndWaitUntilValidatedResponse SubmitPaymentAndWaitUntilValidated(this IRippleRestClient client, Payment payment, string clientResourceId, string secret)
 {
     try
     {
         return(Task.Run <SubmitPaymentAndWaitUntilValidatedResponse>(async() => await client.SubmitPaymentAndWaitUntilValidatedAsync(payment, clientResourceId, secret)).Result);
     }
     catch (AggregateException e)
     {
         ExceptionDispatchInfo.Capture(e.InnerException).Throw();
         return(null);
     }
 }
Exemplo n.º 7
0
 public SignAndSubmitCommand(IRippleRestClient client, IAccountProvider defaultAccountAndPasswordProvider)
 {
     this.client = client;
     this.defaultAccountAndPasswordProvider = defaultAccountAndPasswordProvider;
 }