UpdateControllerCheckForUpdate Method |
Namespace: Kjs.AppLife.Update.Controller
Exception | Condition |
---|---|
InvalidOperationException | IsBusy is . |
DownloadException | An error occurres while downloading director.xml. -or- The downloaded director.xml file cannot be read. |
ValidationException | The downloaded director.xml file is not valid. -or- The downloaded director.xml file's application ID does not match ApplicationId. -or- The PublicKeyToken property is invalid. |
ObjectDisposedException | The UpdateController has been disposed. |
This method downloads director.xml from UpdateLocation and scans it for an available update. This method blocks while checking for updates. To check for updates and continue executing while waiting for the check to complete, use CheckForUpdateAsync. To check for updates using a default dialog, use ShowCheckForUpdateDialog.
The highest-versioned update that can be applied to the current application version (as specified by Version) will be selected by default. To filter updates, add an event handler to the UpdateFound event.
If CheckForUpdate returns , CurrentUpdate will contain a reference to an UpdateInformation class containing information about the selected update; if CheckForUpdate returns , CurrentUpdate will be . Either way, NoUpdateDisplayText will contain the text specified on the update server for display if no update is available.