public static void Run([NotNull] Action action) { ArgumentUtility.CheckNotNull("action", action); var retryUntilTimeout = new RetryUntilTimeout( action, WebTestingConfiguration.Current.SearchTimeout, WebTestingConfiguration.Current.RetryInterval); retryUntilTimeout.Run(); }
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()); }
public RetryUntilTimeout([NotNull] Action action, TimeSpan timeout, TimeSpan retryInterval) { ArgumentUtility.CheckNotNull("action", action); _retryUntilTimeout = new RetryUntilTimeout <object> ( () => { action(); return(null); }, timeout, retryInterval); }