Click or drag to resize
UpdateControllerUpdateStarting Event
Occurs when an update is about to be applied.

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 event UpdateStartingEventHandler UpdateStarting

Value

Type: Kjs.AppLife.Update.ControllerUpdateStartingEventHandler
Remarks

This event is raised whenever the controller is starting an update and preparing to shut down the application in order to apply it. The hosting application is shut down during a call to ApplyUpdate or UpdateInteractive. This event is raised from all UpdateController instances that share the ApplicationId of the UpdateController on which ApplyUpdate was called.

If a handler for this event sets Response to UpdateStartingResponse.CancelUpdate, the update will not be applied and ApplyUpdate will return false. If any other controller takes too long to respond, ApplyUpdate will throw an InstanceShutdownException and the update will not be applied. When calling UpdateInteractive, an exception will not be thrown, but the update will not be applied and an error message will be shown to the user.

If a handler for this event sets Response to UpdateStartingResponse.UpdateWithoutClosing, the update will be applied but the controller that raised the event will not shut down its hosting application.

This method is raised last from the controller that will apply the update, and only if all other controllers did not time out or cancel the update.

When an update is applied using the NoShutdown option, this event is still raised on all instances, but the initiating controller will not automatically shut down its hosting application. The update process can still be cancelled by this event, and by handling the event, individual applications (including the initiating one) can determine whether or not they will shut down. Setting the Response property to UpdateStartingResponse.CloseAndUpdate from the initiating application will override the NoShutdown option and cause the initiating controller to shut down the application.

See Also