/// <summary> /// Executes the transaction /// </summary> /// <returns>Array of non-typed tasks</returns> public Task[] Execute() { if (!RetryUtil.Retry(() => this.contextTransaction.Execute(), 5)) { throw new Exception("Could not commit transaction"); } return(tasks.ToArray()); }
public static void Retry(Action action, int maxAttempts) { RetryUtil.Retry(action, maxAttempts); }
public static TResult Retry <TResult>(Func <TResult> func, int maxAttempts) { return(RetryUtil.Retry(func, maxAttempts)); }