public byte[] DownloadBytes(string url, NameValueCollection data, CookieContainer cookies = null, NameValueCollection customHeaders = null)
{
int limit = 0;
do
{
Proxy proxy = GetAvalibleProxy();
try
{
if (AnonymousProxyOnly && !proxy.IsAnonymous(ProxyJudgeService))
{
continue;
}
byte[] result = DownloadBytes(url, data, proxy, cookies, customHeaders);
if (result != null)
{
return result;
}
}
finally
{
limit++;
proxy.IsBusy = false;
}
limit++;
} while (limit < _numberOfAttemptsPerRequest);
throw new AllProxiesBannedException();
}