1 instantiation of AppHostLauncher
Aspire.Cli.Tests (1)
Commands\AppHostLauncherTests.cs (1)
1364var launcher = new AppHostLauncher(
106 references to AppHostLauncher
aspire (30)
Commands\AppHostLauncher.cs (3)
44ILogger<AppHostLauncher> logger, 935nameof(AppHostLauncher), 949nameof(AppHostLauncher),
Commands\RunCommand.cs (15)
71private readonly AppHostLauncher _appHostLauncher; 137AppHostLauncher appHostLauncher, 164AppHostLauncher.AddLaunchOptions(this); 171var passedAppHostProjectFile = parseResult.GetValue(AppHostLauncher.s_appHostOption); 174var format = parseResult.GetValue(AppHostLauncher.s_formatOption); 175var launchProfile = parseResult.GetValue(AppHostLauncher.s_launchProfileOption); 227AppHostLauncher.s_appHostOption.InnerOption, 228AppHostLauncher.s_appHostOption.LegacyOption, 229AppHostLauncher.s_formatOption, 312var isolated = AppHostLauncher.ResolveIsolated(parseResult); 323if (AppHostLauncher.GetLaunchProfileValidationError(project, launchProfile) is { } launchProfileError) 1478var format = parseResult.GetValue(AppHostLauncher.s_formatOption); 1479var isolated = AppHostLauncher.GetExplicitIsolated(parseResult); 1481var launchProfile = parseResult.GetValue(AppHostLauncher.s_launchProfileOption); 1498additionalArgs.Add($"{AppHostLauncher.s_launchProfileOption.Name}={launchProfile}");
Commands\StartCommand.cs (11)
21private readonly AppHostLauncher _appHostLauncher; 31AppHostLauncher appHostLauncher, 43AppHostLauncher.AddLaunchOptions(this); 50var passedAppHostProjectFile = parseResult.GetValue(AppHostLauncher.s_appHostOption); 51var format = parseResult.GetValue(AppHostLauncher.s_formatOption); 52var explicitIsolated = AppHostLauncher.GetExplicitIsolated(parseResult); 53var launchProfile = parseResult.GetValue(AppHostLauncher.s_launchProfileOption); 82AppHostLauncher.s_appHostOption.InnerOption, 83AppHostLauncher.s_appHostOption.LegacyOption, 84AppHostLauncher.s_formatOption, 112additionalArgs.Add($"{AppHostLauncher.s_launchProfileOption.Name}={launchProfile}");
Program.cs (1)
608builder.Services.AddTransient<AppHostLauncher>();
Aspire.Cli.Tests (76)
Commands\AppHostLauncherTests.cs (43)
34var message = AppHostLauncher.GetDetachedFailureMessage(CliExitCodes.FailedToBuildArtifacts); 42var message = AppHostLauncher.GetDetachedFailureMessage(123); 52var result = AppHostLauncher.IsSuccessfulDetachedEarlyExit(exitCode); 64var path = AppHostLauncher.GenerateChildLogFilePath(logsDirectory, timeProvider); 76var ready = await AppHostLauncher.WaitForAppHostReadyAsync(connection, CancellationToken.None).DefaultTimeout(); 90var exception = await Assert.ThrowsAsync<IOException>(() => AppHostLauncher.WaitForAppHostReadyAsync(connection, CancellationToken.None)).DefaultTimeout(); 97var stable = await AppHostLauncher.WaitForLegacyDetachedStartupStabilityAsync( 112var stable = await AppHostLauncher.WaitForLegacyDetachedStartupStabilityAsync( 493var stable = await AppHostLauncher.WaitForLegacyDetachedStartupStabilityAsync( 525var stable = await AppHostLauncher.WaitForLegacyDetachedStartupStabilityAsync( 936Assert.True(AppHostLauncher.IsExtensionEnvironmentVariable(KnownConfigNames.ExtensionEndpoint)); 937Assert.True(AppHostLauncher.IsExtensionEnvironmentVariable(KnownConfigNames.ExtensionDebugSessionId)); 939Assert.False(AppHostLauncher.IsExtensionEnvironmentVariable(KnownConfigNames.DebugSessionInfo)); 940Assert.False(AppHostLauncher.IsExtensionEnvironmentVariable(KnownConfigNames.DebugSessionRunMode)); 941Assert.False(AppHostLauncher.IsExtensionEnvironmentVariable(KnownConfigNames.DebugSessionPort)); 942Assert.False(AppHostLauncher.IsExtensionEnvironmentVariable(KnownConfigNames.DebugSessionToken)); 943Assert.False(AppHostLauncher.IsExtensionEnvironmentVariable(KnownConfigNames.DebugSessionServerCertificate)); 944Assert.False(AppHostLauncher.IsExtensionEnvironmentVariable(KnownConfigNames.DcpInstanceIdPrefix)); 957var environment = AppHostLauncher.CreateDetachedChildEnvironment(activity, appHostSelectionOrigin: null); 972var environment = AppHostLauncher.CreateDetachedChildEnvironment(null, appHostSelectionOrigin: "explicit-launch-configuration"); 980var environment = AppHostLauncher.CreateDetachedChildEnvironment(null, appHostSelectionOrigin: null); 988var environment = AppHostLauncher.CreateDetachedChildEnvironment(null, appHostSelectionOrigin: null); 999var environment = AppHostLauncher.CreateDetachedChildEnvironment(null, appHostSelectionOrigin: null); 1018var environment = AppHostLauncher.CreateDetachedChildEnvironment(Activity.Current, appHostSelectionOrigin: null); 1036var environment = AppHostLauncher.CreateDetachedChildEnvironment(activity, appHostSelectionOrigin: null); 1048var environment = AppHostLauncher.CreateDetachedChildEnvironment(null, appHostSelectionOrigin: null); 1078var lines = AppHostLauncher.ReadChildLogTail(childLogFile, maxLines: 5); 1098var lines = AppHostLauncher.ReadChildLogTail(childLogFile, maxLines: 4); 1129var entries = AppHostLauncher.ReadChildLogReplayTail(childLogFile, maxLines: 6); 1181var entries = AppHostLauncher.ReadChildLogReplayTail(childLogFile, maxLines: 3); 1221AppHostLauncher launcher, 1239public AppHostLauncher Launcher { get; } 1364var launcher = new AppHostLauncher( 1377NullLogger<AppHostLauncher>.Instance, 1775Assert.True(AppHostLauncher.IsLaunchedByChildCli(candidate, childPid, childStableStartedAt)); 1799Assert.False(AppHostLauncher.IsLaunchedByChildCli(candidate, childPid, childStableStartedAt)); 1820Assert.True(AppHostLauncher.IsLaunchedByChildCli(candidate, childPid, ProcessStartTimeHelper.TryGetProcessStartTimeUnixMilliseconds(childPid))); 1836Assert.False(AppHostLauncher.IsLaunchedByChildCli(candidate, Environment.ProcessId, childStableStartedAt: null)); 1846Assert.True(AppHostLauncher.IsUnattributedAppHostAtPath( 1862Assert.False(AppHostLauncher.IsUnattributedAppHostAtPath( 1880Assert.False(AppHostLauncher.IsUnattributedAppHostAtPath( 1898Assert.True(AppHostLauncher.IsUnattributedAppHostAtPath( 1910Assert.False(AppHostLauncher.IsUnattributedAppHostAtPath(
Commands\BaseCommandTests.cs (1)
682var parsedValue = result.GetValue(AppHostLauncher.s_appHostOption);
Commands\ParseResultHelperTests.cs (4)
222Assert.False(childParseResult.GetValue(AppHostLauncher.s_isolatedOption)); 226Assert.Null(childParseResult.GetValue(AppHostLauncher.s_appHostOption)); 327AppHostLauncher.s_appHostOption.InnerOption, 328AppHostLauncher.s_appHostOption.LegacyOption);
Commands\RootCommandTests.cs (1)
268Assert.Equal("E2E", result.GetValue(AppHostLauncher.s_launchProfileOption));
Commands\RunCommandTests.cs (6)
71Assert.Equal("E2E", result.GetValue(AppHostLauncher.s_launchProfileOption)); 1647var message = AppHostLauncher.GetDetachedFailureMessage(CliExitCodes.FailedToBuildArtifacts); 1655var message = AppHostLauncher.GetDetachedFailureMessage(123); 4398Assert.Null(result.GetValue(AppHostLauncher.s_launchProfileOption)); 5164Assert.False(childParseResult.GetValue(AppHostLauncher.s_isolatedOption)); 5470Assert.Equal(expectedLaunchProfile, childParseResult.GetValue(AppHostLauncher.s_launchProfileOption));
Commands\StartCommandTests.cs (16)
118Assert.Equal("E2E", result.GetValue(AppHostLauncher.s_launchProfileOption)); 203Assert.Null(result.GetValue(AppHostLauncher.s_launchProfileOption)); 625Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("start"))); 626Assert.True(AppHostLauncher.ResolveIsolated(command.Parse("start --isolated"))); 627Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("start --isolated false"))); 628Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("run"))); 629Assert.True(AppHostLauncher.ResolveIsolated(command.Parse("run --isolated"))); 630Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("run --isolated false"))); 644Assert.Equal(expected, AppHostLauncher.GetExplicitIsolated(command.Parse(commandLine))); 657Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("start"))); 658Assert.True(AppHostLauncher.ResolveIsolated(command.Parse("start --isolated"))); 659Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("start --isolated false"))); 660Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("run"))); 661Assert.True(AppHostLauncher.ResolveIsolated(command.Parse("run --isolated"))); 662Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("run --isolated false"))); 704Assert.Equal(expectedLaunchProfile, childParseResult.GetValue(AppHostLauncher.s_launchProfileOption));
DotNet\ProcessExecutionFactoryEnvironmentTests.cs (2)
70AppHostLauncher.CreateDetachedChildEnvironment(activity: null, appHostSelectionOrigin: SelectionOrigin), 76EnvironmentVariableFilter = AppHostLauncher.IsExtensionEnvironmentVariable
Projects\DotNetAppHostProjectTests.cs (1)
1163LaunchProfile = parseResult.GetValue(AppHostLauncher.s_launchProfileOption),
Telemetry\TelemetryConfigurationTests.cs (1)
247var config = AppHostLauncher.CreateDetachedChildEnvironment(activity, appHostSelectionOrigin: null);
Utils\CliTestHelper.cs (1)
268services.AddTransient<AppHostLauncher>();