Run and rerun a func up to retryCount times with a msdelay delay between each try
Syntax
'Declaration
Public Shared Function Retry(Of )( _
ByVal As Func(Of T), _
ByVal As Integer, _
ByVal As Integer, _
ByVal As String _
) As
'Usage
Dim func As Func(Of T)
Dim retryCount As Integer
Dim msdelay As Integer
Dim msg As String
Dim value As
value = Utils.Retry(Of T)(func, retryCount, msdelay, msg)
public static Retry<>(
Func<T> ,
int ,
int ,
string
)
public function Retry(
: Func;
: Integer;
: Integer;
: String
): ; static;
public static function Retry(
: Func,
: int,
: int,
: String
) : ;
public: static Retry<>(
Func<T*>* ,
int ,
int ,
string*
)
public:
static Retrygeneric<typename >
(
Func<T^>^ ,
int ,
int ,
String^
)
Parameters
- func
- function to run
- retryCount
- number of times to retry func
- msdelay
- ms delay between retrys
- msg
- message to identify calling function on failure
Type Parameters
- T
Return Value
return value of func
See Also