Exemple #1
0
        /// <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());
        }
Exemple #2
0
 public static void Retry(Action action, int maxAttempts)
 {
     RetryUtil.Retry(action, maxAttempts);
 }
Exemple #3
0
 public static TResult Retry <TResult>(Func <TResult> func, int maxAttempts)
 {
     return(RetryUtil.Retry(func, maxAttempts));
 }