feat: add Launcher Next .NET 8 foundation
This commit is contained in:
@@ -0,0 +1 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk"><ItemGroup><ProjectReference Include="..\Launcher.Next.Core\Launcher.Next.Core.csproj" /></ItemGroup></Project>
|
||||
@@ -0,0 +1,14 @@
|
||||
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<string, object?> { ["version"] = product.ProductVersion, ["architecture"] = product.Architecture });
|
||||
var prepared = launcher.Prepare(new(product, profile, scriptPath, true));
|
||||
telemetry.Write("LaunchPrepared", new Dictionary<string, object?> { ["dryRun"] = true });
|
||||
return prepared;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user