예제 #1
0
 public void RetrieveUpdateInfo(AppInfo appInfo, UpdateHost appInfoSource, double version, Action <UpdateInfo, UpdateHost> callback)
 {
     if (client.IsBusy)
     {
         throw new Exception("Cannot execute multiple updateinfo requests at once.");
     }
     client.DownloadStringAsync(appInfoSource.GetVersionInfoURL(appInfo, version), new UpdateInfoDownloadHelper(callback, appInfoSource, version));
 }
예제 #2
0
 public void RetrieveUpdateInfos(AppInfo appInfo, UpdateHost appInfoSource, double[] versions, Action <UpdateInfo, UpdateHost, int> callback)
 {
     if (client.IsBusy)
     {
         throw new Exception("Cannot execute multiple updateinfo requests at once.");
     }
     for (int i = 0; i < versions.Length; i++)
     {
         WebClient curClient = new WebClient();
         curClient.DownloadStringCompleted += client_DownloadStringCompleted;
         curClient.DownloadStringAsync(appInfoSource.GetVersionInfoURL(appInfo, versions[i]), new UpdateInfoDownloadHelper(callback, appInfoSource, versions, i));
     }
 }