<PackageReference Include="Microsoft.Data.SqlClient" Version="7.0.0" />

Microsoft.Data.SqlClient.SqlRetryLogicBase

public abstract class SqlRetryLogicBase : ICloneable
Retrieves the next time interval with respect to the number of retries if a transient condition occurs.
public int Current { get; protected set; }

Current retry number starting from zero.

public int NumberOfTries { get; protected set; }

Maximum number of retries.

The timer interval enumerator.

public Predicate<Exception> TransientPredicate { get; protected set; }

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

protected SqlRetryLogicBase()

public virtual object Clone()

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

public abstract void Reset()

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

public virtual bool RetryCondition(object sender)

Pre-retry validation for the sender state.

public abstract bool TryNextInterval(out TimeSpan intervalTime)

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