/// <summary> /// Invokes the given function with a number of retry attempts relative to the given exception type /// <see cref="DbUpdateConcurrencyException"/> which may be raised by the function. This method will either /// succeed within this many attempts, throw an exception of type <see cref="DbUpdateConcurrencyException"/> /// when all attempts are used or throw another exception at any time, depending on the provided function. /// </summary> /// <typeparam name="T">The type of the result of the function.</typeparam> /// <param name="func">The function that should be invoked with 10 retries.</param> /// <returns>The result of <paramref name="func"/>.</returns> protected T ConcurrentInvoke <T>(Func <T> func) { return(ExceptionHelpers.InvokeWithRetries <DbUpdateConcurrencyException, T>(func)); }
/// <summary> /// Invokes the given action with a number of retry attempts relative to the given exception type /// <see cref="DbUpdateConcurrencyException"/> which may be raised by the action. This method will either /// succeed within this many attempts, throw an exception of type <see cref="DbUpdateConcurrencyException"/> /// when all attempts are used or throw another exception at any time, depending on the provided action. /// </summary> /// <param name="action">The action that should be invoked with 10 retries.</param> protected void ConcurrentInvoke(Action action) { ExceptionHelpers.InvokeWithRetries <DbUpdateConcurrencyException>(action); }