示例#1
0
        /// <summary>
        /// Filter accounts that have the given signer or have a trustline to the given asset.
        /// https://www.stellar.org/developers/horizon/reference/endpoints/accounts.html
        /// </summary>
        /// <param name="optionsAction"></param>
        public AccountsRequestBuilder Accounts(Action <AccountsRequestOptions> optionsAction)
        {
            if (optionsAction == null)
            {
                throw new ArgumentNullException(nameof(optionsAction));
            }
            var options = new AccountsRequestOptions();

            optionsAction.Invoke(options);
            return(Accounts(options));
        }
示例#2
0
        /// <summary>
        /// Filter accounts that have the given signer or have a trustline to the given asset.
        /// https://www.stellar.org/developers/horizon/reference/endpoints/accounts.html
        /// </summary>
        /// <param name="options">The filtering options</param>
        public AccountsRequestBuilder Accounts(AccountsRequestOptions options)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            if (options.Signer != null)
            {
                UriBuilder.SetQueryParam("signer", options.Signer);
            }

            if (options.Asset != null)
            {
                UriBuilder.SetQueryParam("asset", AssetToQueryParam(options.Asset));
            }

            return(this);
        }