UpdateManager Class
Namespace: Velopack
Assembly: Velopack
Assembly Version: 0.0.942+a011233
Provides functionality for checking for updates, downloading updates, and applying updates to the current application.
public class UpdateManager
Inheritance: object → UpdateManager
Constructors
Name | Description |
---|---|
UpdateManager(IUpdateSource, UpdateOptions, ILogger, IVelopackLocator) | Creates a new UpdateManager instance using the specified URL or file path to the releases feed, and the specified channel name. |
UpdateManager(string, UpdateOptions, ILogger, IVelopackLocator) | Creates a new UpdateManager instance using the specified URL or file path to the releases feed, and the specified channel name. |
Properties
Name | Description |
---|---|
AppId | The currently installed application Id. This would be what you set when you create your release. |
CurrentVersion | The currently installed app version when you created your release. Null if this is not a currently installed app. |
IsInstalled | True if this application is currently installed, and is able to download/check for updates. |
IsPortable | |
IsUpdatePendingRestart | OBSOLETE: Use UpdatePendingRestart instead. |
UpdatePendingRestart | Returns a VelopackAsset if there is a local update prepared that requires a call to ApplyUpdatesAndRestart(VelopackAsset, string[]) to be applied. |
Methods
Name | Description |
---|---|
ApplyUpdatesAndExit(VelopackAsset) | This will exit your app immediately, apply updates, and then optionally relaunch the app using the specified restart arguments. If you need to save state or clean up, you should do that before calling this method. The user may be prompted during the update, if the update requires additional frameworks to be installed etc. You can check if there are pending updates by checking UpdatePendingRestart. |
ApplyUpdatesAndRestart(VelopackAsset, string[]) | This will exit your app immediately, apply updates, and then optionally relaunch the app using the specified restart arguments. If you need to save state or clean up, you should do that before calling this method. The user may be prompted during the update, if the update requires additional frameworks to be installed etc. You can check if there are pending updates by checking UpdatePendingRestart. |
CheckForUpdates() | |
CheckForUpdatesAsync() | Checks for updates, returning null if there are none available. If there are updates available, this method will return an UpdateInfo object containing the latest available release, and any delta updates that can be applied if they are available. |
DownloadUpdates(UpdateInfo, Action<int>, bool) | |
DownloadUpdatesAsync(UpdateInfo, Action<int>, bool, CancellationToken) | Downloads the specified updates to the local app packages directory. If the update contains delta packages and ignoreDeltas=false, this method will attempt to unpack and prepare them. If there is no delta update available, or there is an error preparing delta packages, this method will fall back to downloading the full version of the update. This function will acquire a global update lock so may fail if there is already another update operation in progress. |
WaitExitThenApplyUpdates(VelopackAsset, bool, bool, string[]) | This will launch the Velopack updater and tell it to wait for this program to exit gracefully. You should then clean up any state and exit your app. The updater will apply updates and then optionally restart your app. The updater will only wait for 60 seconds before giving up. You can check if there are pending updates by checking UpdatePendingRestart. |
WaitExitThenApplyUpdatesAsync(VelopackAsset, bool, bool, string[]) |
Documentation generated by MdDocs