mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Disambiguate updatemanager restart overloads
This commit is contained in:
@@ -48,7 +48,7 @@ public partial class MainWindow : Window
|
||||
|
||||
private void BtnRestartApplyClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_um.ApplyUpdatesAndRestart();
|
||||
_um.ApplyUpdatesAndRestart(_update);
|
||||
}
|
||||
|
||||
private void LogUpdated(object sender, LogUpdatedEventArgs e)
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace VeloWpfSample
|
||||
|
||||
private void BtnRestartApplyClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_um.ApplyUpdatesAndRestart();
|
||||
_um.ApplyUpdatesAndRestart(_update);
|
||||
}
|
||||
|
||||
private void LogUpdated(object sender, LogUpdatedEventArgs e)
|
||||
|
||||
@@ -39,5 +39,10 @@
|
||||
BaseRelease = deltaBaseRelease;
|
||||
DeltasToTarget = deltasToTarget ?? new VelopackAsset[0];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implicitly convert an <see cref="UpdateInfo"/> to a <see cref="VelopackAsset"/>.
|
||||
/// </summary>
|
||||
public static implicit operator VelopackAsset(UpdateInfo updateInfo) => updateInfo.TargetFullRelease;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,11 +9,7 @@ namespace Velopack
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("Please use one of the other overloads of ApplyUpdatesAndRestart() instead.")]
|
||||
public void ApplyUpdatesAndRestart(string[]? restartArgs = null)
|
||||
=> ApplyUpdatesAndRestart((VelopackAsset?) null, restartArgs);
|
||||
|
||||
/// <inheritdoc cref="ApplyUpdatesAndRestart(VelopackAsset, string[])"/>
|
||||
public void ApplyUpdatesAndRestart(UpdateInfo? toApply, string[]? restartArgs = null)
|
||||
=> ApplyUpdatesAndRestart(toApply?.TargetFullRelease, restartArgs);
|
||||
=> ApplyUpdatesAndRestart(null, restartArgs);
|
||||
|
||||
/// <summary>
|
||||
/// This will exit your app immediately, apply updates, and then optionally relaunch the app using the specified
|
||||
@@ -32,12 +28,8 @@ namespace Velopack
|
||||
/// <inheritdoc cref="ApplyUpdatesAndExit(VelopackAsset)"/>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("Please use one of the other overloads of ApplyUpdatesAndExit() instead.")]
|
||||
public void ApplyUpdatesAndExit(string[]? restartArgs = null)
|
||||
=> ApplyUpdatesAndExit((VelopackAsset?) null);
|
||||
|
||||
/// <inheritdoc cref="ApplyUpdatesAndExit(VelopackAsset)"/>
|
||||
public void ApplyUpdatesAndExit(UpdateInfo? toApply)
|
||||
=> ApplyUpdatesAndExit(toApply?.TargetFullRelease);
|
||||
public void ApplyUpdatesAndExit()
|
||||
=> ApplyUpdatesAndExit(null);
|
||||
|
||||
/// <summary>
|
||||
/// This will exit your app immediately, apply updates, and then optionally relaunch the app using the specified
|
||||
|
||||
Reference in New Issue
Block a user