using Launcher.Next.Core; namespace Launcher.Next.Application; public sealed class PrepareLaunchUseCase(IProductDiscovery discovery, IAutodeskProcessLauncher launcher, ILauncherTelemetry telemetry) { public PreparedLaunch Execute(int year, string profile, string scriptPath) { telemetry.Write("ProductDiscoveryStarted"); var product = discovery.DiscoverPlant3D(year) ?? throw new InvalidOperationException("PLANT_PRODUCT_NOT_FOUND"); telemetry.Write("ProductDiscovered", new Dictionary { ["version"] = product.ProductVersion, ["architecture"] = product.Architecture }); var prepared = launcher.Prepare(new(product, profile, scriptPath, true)); telemetry.Write("LaunchPrepared", new Dictionary { ["dryRun"] = true }); return prepared; } }