UpdateControllerDownloadUpdateAsync Method |
Namespace: Kjs.AppLife.Update.Controller
Exception | Condition |
---|---|
InvalidOperationException | IsBusy is . -or- CurrentUpdate is . To set CurrentUpdate, use CheckForUpdate, CheckForUpdateAsync, or ShowCheckForUpdateDialog. |
DownloadException | An error occurs while downloading the update. Check InnerException for the error that occurred. |
ObjectDisposedException | The UpdateController has been disposed. |
This method downloads the update represented by CurrentUpdate. To find an update to download, use CheckForUpdate, CheckForUpdateAsync, or ShowCheckForUpdateDialog. The work is done asynchronously using thread resources that are automatically allocated from the thread pool. To receive notification when the download is complete, add an event handler to the DownloadUpdateCompleted event. To receive notifications as the download progresses, add an event handler to the DownloadUpdateProgressChanged event.
This method does not block the calling thread while the download is being performed. To block while downloading the update, use DownloadUpdate or ShowDownloadUpdateDialog.
You can use the CancelAsync method to cancel asynchronous operations that have not been completed.
If EnableAutoChaining is , this method downloads all updates in the chain and progress events reflect the combined sizes of all updates.