UpdateControllerApplyUpdate Method |
Namespace: Kjs.AppLife.Update.Controller
Exception | Condition |
---|---|
InvalidOperationException | CurrentUpdate was . To set CurrentUpdate, use CheckForUpdate, CheckForUpdateAsync, or ShowCheckForUpdateDialog. -or- The value of IsDownloaded was for CurrentUpdate. This value is set after DownloadUpdate, DownloadUpdateAsync, or ShowDownloadUpdateDialog completes. -or- IsBusy was . -or- The PublicKeyToken property was set to a public key from one of the Quick Start examples that comes with AppLife Update, and the application being updated is not the matching Quick Start. |
ValidationException | The update could not be validated. -or- The update was not valid according to its signature obtained from director.xml and the key specified in PublicKeyToken. Check InnerException for the error that occurred. |
UpdateException | The update could not be applied. Check InnerException for the error that occurred. |
InstanceShutdownException | One or more running instances of the application did not respond to the controller's request to shut down (UpdateStarting). -or- All instances responded to the request to shut down, but at least one besides the current instance remains open and current instance is not running with administrative privileges. |
This method applies an update that has already been downloaded. Internally, it calls ValidateUpdate before applying the update. The update must have already been downloaded using DownloadUpdate, DownloadUpdateAsync, or ShowDownloadUpdateDialog.
This method raises the UpdateStarting event on the controllers in all running instances of the application. If any of those controllers set Response to CancelUpdate, this method returns and the update is not applied.
If the update process is started successfully, this method calls Environment.Exit and does not return.