mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 11:59:48 +00:00
Refactored UpdateService to relocate StopAsync method for improved code organization and readability
This commit is contained in:
parent
129484e98f
commit
9e965b32df
@ -55,6 +55,12 @@ public sealed class UpdateService : BackgroundService, IMessageBusReceiver
|
|||||||
await this.CheckForUpdate();
|
await this.CheckForUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override async Task StopAsync(CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
this.messageBus.Unregister(this);
|
||||||
|
await base.StopAsync(cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -79,16 +85,6 @@ public sealed class UpdateService : BackgroundService, IMessageBusReceiver
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Overrides of BackgroundService
|
|
||||||
|
|
||||||
public override async Task StopAsync(CancellationToken cancellationToken)
|
|
||||||
{
|
|
||||||
this.messageBus.Unregister(this);
|
|
||||||
await base.StopAsync(cancellationToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private async Task CheckForUpdate(bool notifyUserWhenNoUpdate = false)
|
private async Task CheckForUpdate(bool notifyUserWhenNoUpdate = false)
|
||||||
{
|
{
|
||||||
if(!IS_INITIALIZED)
|
if(!IS_INITIALIZED)
|
||||||
|
Loading…
Reference in New Issue
Block a user