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)
|
private void BtnRestartApplyClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
_um.ApplyUpdatesAndRestart();
|
_um.ApplyUpdatesAndRestart(_update);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LogUpdated(object sender, LogUpdatedEventArgs e)
|
private void LogUpdated(object sender, LogUpdatedEventArgs e)
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ namespace VeloWpfSample
|
|||||||
|
|
||||||
private void BtnRestartApplyClick(object sender, RoutedEventArgs e)
|
private void BtnRestartApplyClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
_um.ApplyUpdatesAndRestart();
|
_um.ApplyUpdatesAndRestart(_update);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LogUpdated(object sender, LogUpdatedEventArgs e)
|
private void LogUpdated(object sender, LogUpdatedEventArgs e)
|
||||||
|
|||||||
@@ -39,5 +39,10 @@
|
|||||||
BaseRelease = deltaBaseRelease;
|
BaseRelease = deltaBaseRelease;
|
||||||
DeltasToTarget = deltasToTarget ?? new VelopackAsset[0];
|
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)]
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
[Obsolete("Please use one of the other overloads of ApplyUpdatesAndRestart() instead.")]
|
[Obsolete("Please use one of the other overloads of ApplyUpdatesAndRestart() instead.")]
|
||||||
public void ApplyUpdatesAndRestart(string[]? restartArgs = null)
|
public void ApplyUpdatesAndRestart(string[]? restartArgs = null)
|
||||||
=> ApplyUpdatesAndRestart((VelopackAsset?) null, restartArgs);
|
=> ApplyUpdatesAndRestart(null, restartArgs);
|
||||||
|
|
||||||
/// <inheritdoc cref="ApplyUpdatesAndRestart(VelopackAsset, string[])"/>
|
|
||||||
public void ApplyUpdatesAndRestart(UpdateInfo? toApply, string[]? restartArgs = null)
|
|
||||||
=> ApplyUpdatesAndRestart(toApply?.TargetFullRelease, restartArgs);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 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
|
||||||
@@ -32,12 +28,8 @@ namespace Velopack
|
|||||||
/// <inheritdoc cref="ApplyUpdatesAndExit(VelopackAsset)"/>
|
/// <inheritdoc cref="ApplyUpdatesAndExit(VelopackAsset)"/>
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
[Obsolete("Please use one of the other overloads of ApplyUpdatesAndExit() instead.")]
|
[Obsolete("Please use one of the other overloads of ApplyUpdatesAndExit() instead.")]
|
||||||
public void ApplyUpdatesAndExit(string[]? restartArgs = null)
|
public void ApplyUpdatesAndExit()
|
||||||
=> ApplyUpdatesAndExit((VelopackAsset?) null);
|
=> ApplyUpdatesAndExit(null);
|
||||||
|
|
||||||
/// <inheritdoc cref="ApplyUpdatesAndExit(VelopackAsset)"/>
|
|
||||||
public void ApplyUpdatesAndExit(UpdateInfo? toApply)
|
|
||||||
=> ApplyUpdatesAndExit(toApply?.TargetFullRelease);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 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
|
||||||
|
|||||||
Reference in New Issue
Block a user