public Account RetryDoLogin(TimeSpan retryWait, int retryLimit, string username, string password,
string machineAuth = "", IUserInputOutputHandler userInputOutput = null)
{
if (userInputOutput == null) userInputOutput = new ConsoleInputOutput();
int retries = 0;
Account account = null;
do
{
try
{
account = DoLogin(username, password, machineAuth, userInputOutput);
}
catch (WebException)
{
retries++;
if (retries == retryLimit) throw;
Thread.Sleep(retryWait);
}
} while (account == null);
return account;
}