コード例 #1
0
        public static void Run([NotNull] Action action)
        {
            ArgumentUtility.CheckNotNull("action", action);

            var retryUntilTimeout = new RetryUntilTimeout(
                action,
                WebTestingConfiguration.Current.SearchTimeout,
                WebTestingConfiguration.Current.RetryInterval);

            retryUntilTimeout.Run();
        }
コード例 #2
0
        public static TReturnType Run <TReturnType> ([NotNull] Func <TReturnType> func)
        {
            ArgumentUtility.CheckNotNull("func", func);

            var retryUntilTimeout = new RetryUntilTimeout <TReturnType> (
                func,
                WebTestingConfiguration.Current.SearchTimeout,
                WebTestingConfiguration.Current.RetryInterval);

            return(retryUntilTimeout.Run());
        }
コード例 #3
0
        public RetryUntilTimeout([NotNull] Action action, TimeSpan timeout, TimeSpan retryInterval)
        {
            ArgumentUtility.CheckNotNull("action", action);

            _retryUntilTimeout = new RetryUntilTimeout <object> (
                () =>
            {
                action();
                return(null);
            },
                timeout,
                retryInterval);
        }