Rename Update to UpdateAsync

This commit is contained in:
Stone_Red
2026-02-20 21:01:02 +01:00
parent 8080b2fd11
commit c6853601ac
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ internal class Program
if (char.ToLower(input) == 'y') if (char.ToLower(input) == 'y')
{ {
await updater.Update(); await updater.UpdateAsync();
} }
} }
+3 -3
View File
@@ -41,7 +41,7 @@ namespace AlwaysUpToDate
public delegate void UpdateAvailableHandler(string version, string changelogUrl); public delegate void UpdateAvailableHandler(string version, string changelogUrl);
/// <summary> /// <summary>
/// Occurs when a non-mandatory update is available. Call <see cref="Update"/> to begin downloading. /// Occurs when a non-mandatory update is available. Call <see cref="UpdateAsync"/> to begin downloading.
/// </summary> /// </summary>
public event UpdateAvailableHandler UpdateAvailable; public event UpdateAvailableHandler UpdateAvailable;
@@ -157,7 +157,7 @@ namespace AlwaysUpToDate
/// </summary> /// </summary>
/// <returns>A task that represents the asynchronous update operation.</returns> /// <returns>A task that represents the asynchronous update operation.</returns>
/// <exception cref="ObjectDisposedException">The updater has been disposed.</exception> /// <exception cref="ObjectDisposedException">The updater has been disposed.</exception>
public async Task Update() public async Task UpdateAsync()
{ {
ThrowIfDisposed(); ThrowIfDisposed();
if (!string.IsNullOrWhiteSpace(updateUrl) && Interlocked.CompareExchange(ref updating, 1, 0) == 0) if (!string.IsNullOrWhiteSpace(updateUrl) && Interlocked.CompareExchange(ref updating, 1, 0) == 0)
@@ -212,7 +212,7 @@ namespace AlwaysUpToDate
} }
else else
{ {
await Update(); await UpdateAsync();
} }
} }
else else