SqlRetryLogicBase Class

Definition

Retrieves the next time interval with respect to the number of retries if a transient condition occurs.

C#
public abstract class SqlRetryLogicBase : ICloneable
Inheritance
SqlRetryLogicBase
Implements

Constructors

Properties

Current

Current retry number starting from zero.

NumberOfTries

Maximum number of retries.

RetryIntervalEnumerator

The timer interval enumerator.

TransientPredicate

Delegate to a transient condition predicate. The function that this delegate points to must return a true value when an expected transient exception happens.

Methods

Clone()

Creates a new object that is a copy of the current instance.

Reset()

Set the counters and enumerator to default values for next use.

RetryCondition(Object)

Pre-retry validation for the sender state.

TryNextInterval(TimeSpan)

Try to get the next interval time by using the enumerator if the counter does not exceed the number of retries.

Applies to

Product Versions
SqlClient .NET Core 3.0, 3.1, 4.0, 4.1, 5.0, 5.1, 5.2
SqlClient .NET Framework 3.0, 3.1, 4.0, 4.1, 5.0, 5.1, 5.2
SqlClient .NET Standard 3.0, 3.1, 4.0, 4.1, 5.0, 5.1, 5.2