예제 #1
0
        // Transfers the RetryInfo from the PolicyExecutionContext into the Exception Data
        private void TransferRetryInfo(Exception exception, Polly.Context context)
        {
            RetryInfo retryInfo = context.GetRetryInfo();

            if (retryInfo != null)
            {
                exception.SetRetryInfo(retryInfo);
            }
        }
예제 #2
0
        // Transfers the RetryInfo from the PolicyExecutionContext into the Request Properties
        private void TransferRetryInfo(HttpRequestMessage request, Polly.Context context)
        {
            RetryInfo retryInfo = context.GetRetryInfo();

            if (retryInfo != null)
            {
                request.SetRetryInfo(retryInfo);
            }
        }