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