mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Remove use of deprecated IsUpdatePendingRestart
This commit is contained in:
@@ -93,7 +93,7 @@ public partial class MainWindow : Window
|
|||||||
BtnDownloadUpdate.IsEnabled = false;
|
BtnDownloadUpdate.IsEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_um.IsUpdatePendingRestart) {
|
if (_um.UpdatePendingRestart != null) {
|
||||||
sb.AppendLine("Update ready, pending restart to install");
|
sb.AppendLine("Update ready, pending restart to install");
|
||||||
BtnRestartApply.IsEnabled = true;
|
BtnRestartApply.IsEnabled = true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ namespace CSharpWpf
|
|||||||
BtnDownloadUpdate.IsEnabled = false;
|
BtnDownloadUpdate.IsEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_um.IsUpdatePendingRestart) {
|
if (_um.UpdatePendingRestart != null) {
|
||||||
sb.AppendLine("Update ready, pending restart to install");
|
sb.AppendLine("Update ready, pending restart to install");
|
||||||
BtnRestartApply.IsEnabled = true;
|
BtnRestartApply.IsEnabled = true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace Velopack
|
|||||||
/// This will exit your app immediately, apply updates, and then optionally relaunch the app using the specified
|
/// 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.
|
/// 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.
|
/// 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>
|
/// </summary>
|
||||||
/// <param name="toApply">The target release to apply. Can be left null to auto-apply the newest downloaded release.</param>
|
/// <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>
|
/// <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
|
/// 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.
|
/// 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.
|
/// 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>
|
/// </summary>
|
||||||
/// <param name="toApply">The target release to apply. Can be left null to auto-apply the newest downloaded release.</param>
|
/// <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)
|
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.
|
/// 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
|
/// 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.
|
/// 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>
|
/// </summary>
|
||||||
/// <param name="toApply">The target release to apply. Can be left null to auto-apply the newest downloaded release.</param>
|
/// <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>
|
/// <param name="silent">Configure whether Velopack should show a progress window / dialogs during the updates or not.</param>
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ try {
|
|||||||
|
|
||||||
if (args[0] == "apply") {
|
if (args[0] == "apply") {
|
||||||
var um = new UpdateManager(args[1], null, new ConsoleLogger());
|
var um = new UpdateManager(args[1], null, new ConsoleLogger());
|
||||||
if (!um.IsUpdatePendingRestart) {
|
if (um.UpdatePendingRestart == null) {
|
||||||
Console.WriteLine("not pending restart");
|
Console.WriteLine("not pending restart");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user