Export (0) Print
Expand All

ShouldRetry Delegate

Defines a callback delegate that will be invoked whenever a retry condition is encountered.

Namespace: Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling
Assembly: Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling (in Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.dll) Version: 6.0.0.0 (6.0.1304.0)

public delegate bool ShouldRetry(
	int retryCount,
	Exception lastException,
	out TimeSpan delay
)

Parameters

retryCount
Type: System.Int32
The current retry attempt count.
lastException
Type: System.Exception
The exception that caused the retry conditions to occur.
delay
Type: System.TimeSpan%
The delay that indicates how long the current thread will be suspended before the next iteration is invoked.

Return Value

Type: Boolean
truetrue (True in Visual Basic) if a retry is allowed; otherwise, falsefalse (False in Visual Basic).
Show:
© 2014 Microsoft