mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-22 09:14:25 +08:00
refactor(launcher): replace LauncherFlowCoordinator with LaunchPipeline and slim App shell
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
namespace LanMountainDesktop.Launcher.Startup;
|
||||
|
||||
internal sealed class CleanupDeploymentsPhase : ILaunchPhase
|
||||
{
|
||||
public string Name => nameof(CleanupDeploymentsPhase);
|
||||
|
||||
public Task<LaunchPhaseResult> ExecuteAsync(LaunchContext context, CancellationToken cancellationToken = default)
|
||||
{
|
||||
context.DeploymentLocator.CleanupOldDeployments(minVersionsToKeep: 3);
|
||||
context.OobeDecision = context.OobeStateService.Evaluate(context.CommandContext);
|
||||
context.LauncherContextDetails = LaunchResultBuilder.BuildLauncherContextDetails(
|
||||
context.CommandContext,
|
||||
context.OobeDecision,
|
||||
context.DeploymentLocator.GetAppRoot());
|
||||
return Task.FromResult(new LaunchPhaseResult(LaunchPhaseStatus.Continue));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user