Click or drag to resize
UpdateControllerCheckForUpdate Method
Searches for an available update. If an update is found, its information can be retrieved from CurrentUpdate.

Namespace: Kjs.AppLife.Update.Controller
Assembly: Kjs.AppLife.Update.Controller (in Kjs.AppLife.Update.Controller.dll) Version: 5.1.0.9 (5.1.0.9)
Syntax
public bool CheckForUpdate()

Return Value

Type: Boolean
if an update is found; otherwise, .
Exceptions
ExceptionCondition
InvalidOperationExceptionIsBusy 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.

Remarks

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.

See Also