Constructor.
Alias for a delegate which executes a code block and decides if it has succeeded or failed.
Initiates the execution and possible retrying of a block of code.
Called before a retry is commenced. The base class behaviour does nothing, but it can be overridden by derived classes to implement special behaviour on retry.
Decides whether to keep retrying or to give up.
decides whether to keep retrying or to give up
called every time a retry occurs (does nothing by default)
Basic retrying class. Retries a specified block of code a specified number of times before giving up. The 'code block' is passed as a lazy bool parameter to the loop() / opCall() method.
The failure condition for the block of code can be set by passing a delegate to the constructor. The default failure condition is that any exception thrown while executing the code block indicates failure.
The behaviour of the class can be easily modified by inherting and overriding the following methods: