Provides common functionality to retry logic with configurable delay.
More...
|
| static void | RunWithRetries (this Action action, int retries, [CallerFilePath] string callerFilePath=null, [CallerLineNumber] int callerLineNumber=-1, [CallerMemberName] string callerMemberName=null) |
| |
| static void | RunWithRetries (this Action action, int retries, TimeSpan[] retryDelays, [CallerFilePath] string callerFilePath=null, [CallerLineNumber] int callerLineNumber=-1, [CallerMemberName] string callerMemberName=null) |
| |
| static T | RunWithRetries< T > (this Func< T > func, int retries, [CallerFilePath] string callerFilePath=null, [CallerLineNumber] int callerLineNumber=-1, [CallerMemberName] string callerMemberName=null) |
| | Runs the provided function with the requested number of retries and provided backoff delays.
|
| |
| static T | RunWithRetries< T > (this Func< T > func, int retries, TimeSpan[] retryDelays, [CallerFilePath] string callerFilePath=null, [CallerLineNumber] int callerLineNumber=-1, [CallerMemberName] string callerMemberName=null) |
| | Runs the provided function with the requested number of retries and provided backoff delays.
|
| |
| static async Task | RunWithRetries (this Func< Task > asyncFunc, int retries, TimeSpan[] retryDelays, [CallerFilePath] string callerFilePath=null, [CallerLineNumber] int callerLineNumber=-1, [CallerMemberName] string callerMemberName=null) |
| |
| static async Task< T > | RunWithRetries< T > (this Func< Task< T > > func, int retries, [CallerFilePath] string callerFilePath=null, [CallerLineNumber] int callerLineNumber=-1, [CallerMemberName] string callerMemberName=null) |
| | Runs the provided function with the requested number of retries and provided backoff delays.
|
| |
| static async Task< T > | RunWithRetries< T > (this Func< Task< T > > func, int retries, TimeSpan[] retryDelays, [CallerFilePath] string callerFilePath=null, [CallerLineNumber] int callerLineNumber=-1, [CallerMemberName] string callerMemberName=null) |
| | Runs the provided function with the requested number of retries and provided backoff delays.
|
| |
Provides common functionality to retry logic with configurable delay.
◆ RunWithRetries() [1/3]
| static void PeanutButter.Utils.RetryExtensions.RunWithRetries |
( |
this Action |
action, |
|
|
int |
retries, |
|
|
[CallerFilePath] string |
callerFilePath = null, |
|
|
[CallerLineNumber] int |
callerLineNumber = -1, |
|
|
[CallerMemberName] string |
callerMemberName = null |
|
) |
| |
|
static |
- Parameters
-
| action | |
| retries | |
| callerFilePath | do not set - automatically set by the compiler |
| callerLineNumber | do not set - automatically set by the compiler |
| callerMemberName | do not set - automatically set by the compiler |
◆ RunWithRetries() [2/3]
| static void PeanutButter.Utils.RetryExtensions.RunWithRetries |
( |
this Action |
action, |
|
|
int |
retries, |
|
|
TimeSpan[] |
retryDelays, |
|
|
[CallerFilePath] string |
callerFilePath = null, |
|
|
[CallerLineNumber] int |
callerLineNumber = -1, |
|
|
[CallerMemberName] string |
callerMemberName = null |
|
) |
| |
|
static |
- Parameters
-
| action | |
| retries | |
| retryDelays | |
| callerFilePath | do not set - automatically set by the compiler |
| callerLineNumber | do not set - automatically set by the compiler |
| callerMemberName | do not set - automatically set by the compiler |
◆ RunWithRetries() [3/3]
| static async Task PeanutButter.Utils.RetryExtensions.RunWithRetries |
( |
this Func< Task > |
asyncFunc, |
|
|
int |
retries, |
|
|
TimeSpan[] |
retryDelays, |
|
|
[CallerFilePath] string |
callerFilePath = null, |
|
|
[CallerLineNumber] int |
callerLineNumber = -1, |
|
|
[CallerMemberName] string |
callerMemberName = null |
|
) |
| |
|
static |
- Parameters
-
| asyncFunc | |
| retries | |
| retryDelays | |
| callerFilePath | |
| callerLineNumber | |
| callerMemberName | |
◆ RunWithRetries< T >() [1/4]
Runs the provided function with the requested number of retries and provided backoff delays.
- Parameters
-
| func | |
| retries | |
| callerFilePath | do not set - automatically set by the compiler |
| callerLineNumber | do not set - automatically set by the compiler |
| callerMemberName | do not set - automatically set by the compiler |
- Template Parameters
-
- Returns
- Exceptions
-
| ArgumentNullException | |
| ArgumentException | |
◆ RunWithRetries< T >() [2/4]
| static T PeanutButter.Utils.RetryExtensions.RunWithRetries< T > |
( |
this Func< T > |
func, |
|
|
int |
retries, |
|
|
TimeSpan[] |
retryDelays, |
|
|
[CallerFilePath] string |
callerFilePath = null, |
|
|
[CallerLineNumber] int |
callerLineNumber = -1, |
|
|
[CallerMemberName] string |
callerMemberName = null |
|
) |
| |
|
static |
Runs the provided function with the requested number of retries and provided backoff delays.
- Parameters
-
| func | |
| retries | |
| retryDelays | |
| callerFilePath | do not set - automatically set by the compiler |
| callerLineNumber | do not set - automatically set by the compiler |
| callerMemberName | do not set - automatically set by the compiler |
- Template Parameters
-
- Returns
- Exceptions
-
| ArgumentNullException | |
| ArgumentException | |
◆ RunWithRetries< T >() [3/4]
| static async Task< T > PeanutButter.Utils.RetryExtensions.RunWithRetries< T > |
( |
this Func< Task< T > > |
func, |
|
|
int |
retries, |
|
|
[CallerFilePath] string |
callerFilePath = null, |
|
|
[CallerLineNumber] int |
callerLineNumber = -1, |
|
|
[CallerMemberName] string |
callerMemberName = null |
|
) |
| |
|
static |
Runs the provided function with the requested number of retries and provided backoff delays.
- Parameters
-
| func | |
| retries | |
| callerFilePath | do not set - automatically set by the compiler |
| callerLineNumber | do not set - automatically set by the compiler |
| callerMemberName | do not set - automatically set by the compiler |
- Template Parameters
-
- Returns
- Exceptions
-
| ArgumentNullException | |
| ArgumentException | |
◆ RunWithRetries< T >() [4/4]
| static async Task< T > PeanutButter.Utils.RetryExtensions.RunWithRetries< T > |
( |
this Func< Task< T > > |
func, |
|
|
int |
retries, |
|
|
TimeSpan[] |
retryDelays, |
|
|
[CallerFilePath] string |
callerFilePath = null, |
|
|
[CallerLineNumber] int |
callerLineNumber = -1, |
|
|
[CallerMemberName] string |
callerMemberName = null |
|
) |
| |
|
static |
Runs the provided function with the requested number of retries and provided backoff delays.
- Parameters
-
| func | |
| retries | |
| retryDelays | |
| callerFilePath | do not set - automatically set by the compiler |
| callerLineNumber | do not set - automatically set by the compiler |
| callerMemberName | do not set - automatically set by the compiler |
- Template Parameters
-
- Returns
- Exceptions
-
| ArgumentNullException | |
| ArgumentException | |
The documentation for this class was generated from the following file:
- source/Utils/PeanutButter.Utils/RetryExtensions.cs