Braintree.Api.BraintreeFragment.GetPaymentNonceAsync C# (CSharp) Method

GetPaymentNonceAsync() public method

public GetPaymentNonceAsync ( ) : Task
return Task
        public async Task<PaymentMethodNonce> GetPaymentNonceAsync()
        {
            var actionListener = new PaymentMethodNonceListener();
            try
            {
                AddListener(actionListener);

                return await actionListener.Task();
            }
            // There is no catch statements here. Exception handling must be done by caller.
            finally
            {
                RemoveListener(actionListener);
            }
        }