public void Execute()
{
foreach (string textureId in m_textureIds)
{
string thisTextureUrl = string.Format("{0}?texture_id={1}", m_getTextureUrl, textureId);
WebRequest req = HttpWebRequest.Create(thisTextureUrl);
try
{
using (WebResponse response = req.GetResponse())
{
// Console.WriteLine("Successfully executed {0} {1}", req.Method, req.RequestUri);
long len = response.ContentLength;
m_test.TotalBytes += len;
if (len <= 0)
{
Console.WriteLine("ERROR: Got length {0} for {1} {2}", len, req.Method, req.RequestUri);
}
else
{
Console.WriteLine("Got length {0} for {1} {2}", len, req.Method, req.RequestUri);
m_test.SuccessfulRequests++;
}
}
}
catch (WebException e)
{
Console.WriteLine("ERROR: Got {0} on {1} {2}", e.Status, req.Method, req.RequestUri);
}
}
}