public RetryingHttpClient( IHttpClient httpClient, IHttpApiWithRetrying httpApiWithRetrying, IRetryPredicate retryPredicate, IRetryDelay retryDelay, IEnumerable <IHttpClientEventCallback> callbacks) { _httpClient = httpClient; _httpApiWithRetrying = httpApiWithRetrying; _retryPredicate = retryPredicate; _retryDelay = retryDelay; _callbacks = callbacks; }
public static IHttpClient AddRetrying( this IHttpClient httpClient, IHttpApiWithRetrying httpApiWithRetrying, IRetryManager retryManager, IEnumerable <IHttpClientEventCallback> callbacks) { return(new RetryingHttpClient( httpClient, httpApiWithRetrying, retryManager.GetPredicate(httpApiWithRetrying.RetryPolicy), retryManager.GetDelay(httpApiWithRetrying.RetryPolicy), callbacks)); }