Beispiel #1
0
 public void DownloadFile(String Url, String FileName)
 {
     for (int RetryCount = 1; true; RetryCount++)
     {
         try
         {
             HttpClient httpClient = new HttpClient();
             httpClient.DownloadFile(Url, FileName);
             return;
         }
         catch (Exception ex)
         {
             if (RetryCount == MaxRetryCount)
             {
                 throw ex;
             }
         }
     }
 }
Beispiel #2
0
 public void DownloadFile(String Url, String FileName)
 {
     for (int RetryCount = 1 ; true ; RetryCount++)
     {
         try
         {
             HttpClient httpClient = new HttpClient();
             httpClient.DownloadFile(Url, FileName);
             return;
         }
         catch (Exception ex)
         {
             if (RetryCount == MaxRetryCount)
                 throw ex;
         }
     }
 }
Beispiel #3
0
 public void DownloadFile(String FileName)
 {
     httpClient.DownloadFile(Url, FileName);
 }