TestimoX

API Reference

Class

RetryExecutor

Namespace TestimoX.Execution
Assembly TestimoX
Modifiers static

Utility class that provides retry capability for rule executions.

Inheritance

  • Object
  • RetryExecutor

Methods

CalculateRetryDelay(System.Int32 retryAttempt) #

Calculates the delay for a retry attempt using exponential backoff.

Parameters

retryAttempt System.Int32 required
The retry attempt number (0-based: 0 = first retry, 1 = second retry, etc.)

Returns

Delay in milliseconds

public static async Task ExecuteWithRetryAsync(String ruleName, Func<Task> ruleAction, Func<Exception, Boolean> shouldRetry = null) #
Returns: Task

Executes a rule action with retry logic.

Parameters

ruleName System.String requiredposition: 0
Name of the rule being executed
ruleAction System.Func{System.Threading.Tasks.Task} requiredposition: 1
The action to execute
shouldRetry System.Func{System.Exception,System.Boolean} = null optionalposition: 2
Optional predicate to determine if a failure should be retried

Returns

Task representing the execution

public static Boolean IsTransientError(Exception exception) #
Returns: Boolean

Determines if an exception indicates a transient error that should be retried.

Parameters

exception System.Exception requiredposition: 0
The exception to check

Returns

True if the exception indicates a transient error

public static Void ResetRuleState(RuleComplete rule) #
Returns: Void

Resets the rule state to prepare for a retry attempt.

Parameters

rule TestimoX.Definitions.RuleComplete requiredposition: 0