Partager via


IIotHubClientRetryPolicy.ShouldRetry(UInt32, Exception, TimeSpan) Méthode

Définition

Méthode appelée par le client avant une nouvelle tentative.

public bool ShouldRetry (uint currentRetryCount, Exception lastException, out TimeSpan retryDelay);
abstract member ShouldRetry : uint32 * Exception * TimeSpan -> bool
Public Function ShouldRetry (currentRetryCount As UInteger, lastException As Exception, ByRef retryDelay As TimeSpan) As Boolean

Paramètres

currentRetryCount
UInt32

Nombre de fois où l’opération en cours a été tentée.

lastException
Exception

Exception à l’origine de cette stratégie de nouvelle tentative case activée.

retryDelay
TimeSpan

Définissez cette valeur sur le délai souhaité avant la prochaine tentative.

Retours

True si l’opération doit être retentée, sinon false.

S’applique à