Diff<>(old, new, comparer, predicate, postProcessor) NewArray<>(size1, size2, size3, initialiser) RunMain(main, onUnhandledMain, onUnhandledThread) RunMain(main, onUnhandledMain, onUnhandledThread)
Legend Class Struct Enum Interface Delegate | Constructor Method Property Event Field |
| Static method: TResult OnExceptionRetryThenDefault<TResult, TException>(Func<TResult>, TResult, int, int)Declarationpublic static TResult OnExceptionRetryThenDefault<TResult, TException>(
Func<TResult> func,
TResult default,
int attempts = 3,
int delayMs = 333
) Summary
Evaluates the specified code and returns its result. If the code throws TException, retries
the specified number of times. If the code still throws TException on the final attempt,
returns default instead. Doesn't catch any other exceptions. Generic type parametersTResult | This type parameter is not documented. | TException | This type parameter is not documented. |
ParametersFunc<TResult> | func |
The code to be executed. | TResult | default |
Value to return in case of failure. | int | attempts |
The maximum number of times to retry func before giving up. | int | delayMs |
Delay, in milliseconds, before retrying func. |
|