Amazon.Runtime.RetryPolicy.RetryAsync C# (CSharp) Method

RetryAsync() public method

Checks if a retry should be performed with the given execution context and exception.
public RetryAsync ( IExecutionContext executionContext, Exception exception ) : Task
executionContext IExecutionContext The execution context which contains both the /// requests and response context.
exception Exception The exception throw after issuing the request.
return Task
        public async Task<bool> RetryAsync(IExecutionContext executionContext, Exception exception)
        {
            bool retryFlag;
            var helperResult = RetrySync(executionContext, exception);
            if (helperResult.HasValue)
            {
                retryFlag = helperResult.Value;
            }
            else
            {
                retryFlag = await RetryForExceptionAsync(executionContext, exception).ConfigureAwait(false);
            }
            return (retryFlag && OnRetry(executionContext));
        }