Selerix Developer Tools
Retry<T> Method






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

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

Reference

Utils Class
Utils Members