// 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); } }
// 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); } }