Exemple #1
0
        /// <summary>
        /// 设置执行的方法
        /// </summary>
        /// <param name="doAction"></param>
        /// <returns></returns>
        public static FailureRetryBuilder Bind(Action doAction)
        {
            var builder = new FailureRetryBuilder();

            builder.doAction = doAction;
            return(builder);
        }
Exemple #2
0
        /// <summary>
        /// 设置执行的方法
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="doAction"></param>
        /// <returns></returns>
        public static FailureRetryBuilder <T> Bind <T>(Func <T> doAction)
        {
            var builder = new FailureRetryBuilder <T>();

            builder.doAction = doAction;
            return(builder);
        }