Remove use of deprecated IsUpdatePendingRestart

This commit is contained in:
Caelan
2024-09-22 16:18:53 -06:00
parent 9dd1081adb
commit 046bccb712
4 changed files with 6 additions and 6 deletions

View File

@@ -93,7 +93,7 @@ public partial class MainWindow : Window
BtnDownloadUpdate.IsEnabled = false;
}
if (_um.IsUpdatePendingRestart) {
if (_um.UpdatePendingRestart != null) {
sb.AppendLine("Update ready, pending restart to install");
BtnRestartApply.IsEnabled = true;
} else {

View File

@@ -90,7 +90,7 @@ namespace CSharpWpf
BtnDownloadUpdate.IsEnabled = false;
}
if (_um.IsUpdatePendingRestart) {
if (_um.UpdatePendingRestart != null) {
sb.AppendLine("Update ready, pending restart to install");
BtnRestartApply.IsEnabled = true;
} else {

View File

@@ -10,7 +10,7 @@ namespace Velopack
/// 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 <see cref="IsUpdatePendingRestart"/>.
/// You can check if there are pending updates by checking <see cref="UpdatePendingRestart"/>.
/// </summary>
/// <param name="toApply">The target release to apply. Can be left null to auto-apply the newest downloaded release.</param>
/// <param name="restartArgs">The arguments to pass to the application when it is restarted.</param>
@@ -24,7 +24,7 @@ namespace Velopack
/// 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 <see cref="IsUpdatePendingRestart"/>.
/// You can check if there are pending updates by checking <see cref="UpdatePendingRestart"/>.
/// </summary>
/// <param name="toApply">The target release to apply. Can be left null to auto-apply the newest downloaded release.</param>
public void ApplyUpdatesAndExit(VelopackAsset? toApply)
@@ -37,7 +37,7 @@ namespace Velopack
/// 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 <see cref="IsUpdatePendingRestart"/>.
/// You can check if there are pending updates by checking <see cref="UpdatePendingRestart"/>.
/// </summary>
/// <param name="toApply">The target release to apply. Can be left null to auto-apply the newest downloaded release.</param>
/// <param name="silent">Configure whether Velopack should show a progress window / dialogs during the updates or not.</param>

View File

@@ -77,7 +77,7 @@ try {
if (args[0] == "apply") {
var um = new UpdateManager(args[1], null, new ConsoleLogger());
if (!um.IsUpdatePendingRestart) {
if (um.UpdatePendingRestart == null) {
Console.WriteLine("not pending restart");
return -1;
}