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

Retry() public method

Checks if a retry should be performed with the given execution context and exception.
public Retry ( IExecutionContext executionContext, Exception exception ) : bool
executionContext IExecutionContext The execution context which contains both the /// requests and response context.
exception Exception The exception throw after issuing the request.
return bool
        public bool Retry(IExecutionContext executionContext, Exception exception)
        {
            bool retryFlag;
            var syncResult = RetrySync(executionContext, exception);
            if (syncResult.HasValue)
            {
                retryFlag = syncResult.Value;
            }
            else
            {
                retryFlag = RetryForException(executionContext, exception);
            }
            return (retryFlag && OnRetry(executionContext));
        }