From 046bccb712d3948d01c86c2af667d1af558940b6 Mon Sep 17 00:00:00 2001 From: Caelan Date: Sun, 22 Sep 2024 16:18:53 -0600 Subject: [PATCH] Remove use of deprecated IsUpdatePendingRestart --- samples/CSharpAvalonia/MainWindow.axaml.cs | 2 +- samples/CSharpWpf/MainWindow.xaml.cs | 2 +- src/lib-csharp/UpdateManager.Helpers.cs | 6 +++--- test/TestApp/Program.cs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/CSharpAvalonia/MainWindow.axaml.cs b/samples/CSharpAvalonia/MainWindow.axaml.cs index 294fd691..d85b512c 100644 --- a/samples/CSharpAvalonia/MainWindow.axaml.cs +++ b/samples/CSharpAvalonia/MainWindow.axaml.cs @@ -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 { diff --git a/samples/CSharpWpf/MainWindow.xaml.cs b/samples/CSharpWpf/MainWindow.xaml.cs index ce78683e..93656d9b 100644 --- a/samples/CSharpWpf/MainWindow.xaml.cs +++ b/samples/CSharpWpf/MainWindow.xaml.cs @@ -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 { diff --git a/src/lib-csharp/UpdateManager.Helpers.cs b/src/lib-csharp/UpdateManager.Helpers.cs index c94c5c4b..0110abc5 100644 --- a/src/lib-csharp/UpdateManager.Helpers.cs +++ b/src/lib-csharp/UpdateManager.Helpers.cs @@ -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 . + /// You can check if there are pending updates by checking . /// /// The target release to apply. Can be left null to auto-apply the newest downloaded release. /// The arguments to pass to the application when it is restarted. @@ -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 . + /// You can check if there are pending updates by checking . /// /// The target release to apply. Can be left null to auto-apply the newest downloaded release. 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 . + /// You can check if there are pending updates by checking . /// /// The target release to apply. Can be left null to auto-apply the newest downloaded release. /// Configure whether Velopack should show a progress window / dialogs during the updates or not. diff --git a/test/TestApp/Program.cs b/test/TestApp/Program.cs index 07e65208..1107e082 100644 --- a/test/TestApp/Program.cs +++ b/test/TestApp/Program.cs @@ -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; }