public static Task <IReadOnlyList <RetryActionResult <TSource, TResult> > > ExecuteAsyncWithDiag <TSource, TResult>(
            this IResourceManager <TSource> mgr,
            RandomSourceAsyncFunc <TSource, TResult> taskFunc,
            ShouldRetryPredicate shouldRetry,
            OnError onError = null)
        {
            var retryAction = new RetryAction <TSource>(mgr.SelectRandomly, mgr.UpdateWeight);

            return(retryAction.ExecuteAsyncWithDiag(taskFunc, shouldRetry, onError));
        }
        // TODO: Test
        public static TResult ExecuteAction <TSource, TResult>(
            this IResourceManager <TSource> mgr,
            RandomSourceFunc <TSource, TResult> func,
            ShouldRetryPredicate shouldRetry,
            OnError onError = null)
        {
            var retryAction = new RetryAction <TSource>(mgr.SelectRandomly, mgr.UpdateWeight);

            return(retryAction.ExecuteAction(func, shouldRetry, onError));
        }