ShouldRetry Delegate
Retired Content |
---|
This content and the technology described is outdated and is no longer being maintained. For more information, see Transient Fault Handling. |
Defines a callback delegate that will be invoked whenever a retry condition is encountered.
Namespace: Microsoft.Practices.TransientFaultHandling
Assembly: Microsoft.Practices.TransientFaultHandling.Core (in Microsoft.Practices.TransientFaultHandling.Core.dll) Version: 5.0.1118.0 (5.0.1118.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 which caused the retry conditions to occur.
- delay
Type: System.TimeSpan%
The delay indicating how long the current thread will be suspended for before the next iteration will be invoked.
Return Value
Returns a callback delegate that will be invoked whenever to retry should be attempt.