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)
Syntax
public delegate bool ShouldRetry(
int retryCount,
Exception lastException,
out TimeSpan delay
)
'Declaration
Public Delegate Function ShouldRetry (
retryCount As Integer,
lastException As Exception,
<OutAttribute> ByRef delay As TimeSpan
) As Boolean
public delegate bool ShouldRetry(
int retryCount,
Exception^ lastException,
[OutAttribute] 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).
See Also
Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling Namespace