public void RetryTimeoutFailed() { RetryPolicy rp = new RetryPolicy(5, new FixedWaitingPolicy(TimeSpan.FromMilliseconds(10)), AllErrorsTransientDetectionStrategy.Instance); int attempts = 0; rp.ExecuteWithRetries(() => { attempts++; throw new OperationCanceledException(); }); }
public void RetryNullOperationT() { RetryPolicy rp = new RetryPolicy <string>(5, new FixedWaitingPolicy(TimeSpan.FromMilliseconds(10)), AllErrorsTransientDetectionStrategy <string> .Instance); rp.ExecuteWithRetries(null); }