Megosztás a következőn keresztül:


IIotHubServiceRetryPolicy.ShouldRetry(UInt32, Exception, TimeSpan) Method

Definition

Method called by the client prior to a retry.

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

Parameters

currentRetryCount
UInt32

The number of times the current operation has been attempted.

lastException
Exception

The exception that caused this retry policy check.

retryDelay
TimeSpan

Set this to the desired delay prior to the next attempt.

Returns

True if the operation should be retried, otherwise false.

Applies to