// Token: 0x060040AB RID: 16555 RVA: 0x00127558 File Offset: 0x00125758
        internal static bool TryCallAction(Action action, RetryHelper.RetryPreamble preamble, List <Type> ignoredExceptions, int retries = 3, bool throwOnFailure = false)
        {
            RetryHelper.ValidateExceptionTypeList(ignoredExceptions);
            int  num   = retries;
            bool flag  = false;
            bool flag2 = true;

            do
            {
                try
                {
                    if (action != null)
                    {
                        action();
                    }
                    flag = true;
                    break;
                }
                catch (Exception exception) when(RetryHelper.MatchException(exception, ignoredExceptions))
                {
                }
                num--;
                if (num > 0)
                {
                    flag2 = preamble();
                }
            }while (num > 0 && flag2);
            if (!flag && throwOnFailure)
            {
                throw new RetriesExhaustedException();
            }
            return(flag);
        }
        // Token: 0x060040AD RID: 16557 RVA: 0x00127660 File Offset: 0x00125860
        internal static bool TryExecuteFunction <TResult>(Func <TResult> func, out TResult result, RetryHelper.RetryPreamble preamble, List <Type> ignoredExceptions, int retries = 3, bool throwOnFailure = false)
        {
            RetryHelper.ValidateExceptionTypeList(ignoredExceptions);
            result = default(TResult);
            int  num   = retries;
            bool flag  = false;
            bool flag2 = true;

            do
            {
                try
                {
                    if (func != null)
                    {
                        result = func();
                    }
                    flag = true;
                    break;
                }
                catch (Exception exception) when(RetryHelper.MatchException(exception, ignoredExceptions))
                {
                }
                num--;
                if (num > 0)
                {
                    flag2 = preamble();
                }
            }while (num > 0 && flag2);
            if (!flag && throwOnFailure)
            {
                throw new RetriesExhaustedException();
            }
            return(flag);
        }