8 implementations of IProcessExecution
aspire (1)
DotNet\ProcessExecution.cs (1)
13
internal sealed class ProcessExecution : ChildProcess,
IProcessExecution
Aspire.Cli.Tests (7)
Commands\AppHostLauncherTests.cs (3)
1585
ProcessInvocationOptions options) :
IProcessExecution
1628
private sealed class MonitoredProcessExecutionAdapter(Process process, Process? exitMonitorProcess = null, DateTimeOffset? startTime = null, bool useSuppliedStartTime = false) :
IProcessExecution
1697
private sealed class NonExitingProcessExecution :
IProcessExecution
Commands\StartCommandTests.cs (1)
737
private sealed class TestDetachedProcessExecution(Action onStart) :
IProcessExecution
DotNet\DotNetCliRunnerTests.cs (1)
3184
int exitCode) :
IProcessExecution
Telemetry\InternalMicrosoftDetectorTests.cs (1)
1892
IDictionary<string, string>? environment) :
IProcessExecution
TestServices\TestProcessExecutionFactory.cs (1)
178
internal sealed class TestProcessExecution :
IProcessExecution
85 references to IProcessExecution
aspire (38)
Commands\AppHostLauncher.cs (5)
427
private record LaunchResult(
IProcessExecution
? ChildProcess, IAppHostAuxiliaryBackchannel? Backchannel, DashboardUrlsState? DashboardUrls, bool ChildExitedEarly, int ChildExitCode, DateTimeOffset? ChildStartedAt = null);
438
IProcessExecution
? childProcess = null;
630
private async ValueTask DisposeAfterFailedStartAsync(
IProcessExecution
? childProcess)
647
private Task RequestGracefulShutdownThenForceKillAsync(
IProcessExecution
childProcess, DateTimeOffset? childStartedAt)
732
private LaunchResult CreateChildExitedLaunchResult(
IProcessExecution
childProcess, ProfilingTelemetry.ActivityScope waitForBackchannelActivity, DateTimeOffset? childStartedAt)
Commands\DashboardRunCommand.cs (2)
418
IProcessExecution
process;
433
await using
var
_ = process;
DotNet\DotNetCliRunner.cs (2)
293
var
execution = executionFactory.CreateExecution(processFileName, effectiveArgs, finalEnv, workingDirectory, instrumentedOptions);
538
IProcessExecution
? execution,
DotNet\IProcessExecutionFactory.cs (4)
19
/// <returns>A configured <see cref="
IProcessExecution
"/> ready to be started.</returns>
20
IProcessExecution
CreateExecution(
37
/// <returns>A configured <see cref="
IProcessExecution
"/> ready to be started.</returns>
38
IProcessExecution
CreateExecution(
DotNet\ProcessExecutionFactory.cs (2)
50
public
IProcessExecution
CreateExecution(string fileName, string[] args, IDictionary<string, string>? env, DirectoryInfo workingDirectory, ProcessInvocationOptions options)
88
public
IProcessExecution
CreateExecution(ProcessStartInfo startInfo, ProcessInvocationOptions options)
Layout\LayoutProcessRunner.cs (3)
43
await using
var
execution = executionFactory.CreateExecution(toolPath, args, effectiveEnvironment, workDir, options);
56
public async Task<
IProcessExecution
> StartAsync(
82
var
execution = executionFactory.CreateExecution(toolPath, args, effectiveEnvironment, workDir, effectiveOptions);
Profiling\ProfileCaptureService.cs (4)
103
IProcessExecution
dashboardProcess;
224
private readonly
IProcessExecution
_dashboardProcess;
237
IProcessExecution
dashboardProcess,
247
IProcessExecution
dashboardProcess,
Projects\AppHostServerSession.cs (3)
20
/// The session drives the child entirely through the <see cref="
IProcessExecution
"/> returned by
53
private
IProcessExecution
? _execution;
276
private static async Task DriveAsync(
IProcessExecution
execution, TaskCompletionSource<int> completion, CancellationToken stopToken)
Projects\DotNetBasedAppHostServerProject.cs (1)
636
IProcessExecution
execution = null!;
Projects\GuestAppHostProject.cs (1)
1109
await using
var
execution = _processExecutionFactory.CreateExecution(
Projects\IAppHostServerProject.cs (2)
31
/// The started <see cref="
IProcessExecution
"/> that owns the server child. Callers observe state
41
IProcessExecution
Execution);
Projects\NativeAppHostServerProject.cs (2)
142
await using
var
execution = _processes.CreateExecution(start, new ProcessInvocationOptions
255
var
execution = _processes.CreateExecution(startInfo, new ProcessInvocationOptions
Projects\PrebuiltAppHostServer.cs (1)
801
IProcessExecution
execution = null!;
Projects\ProcessGuestLauncher.cs (1)
78
IProcessExecution
execution = null!;
Utils\EnvironmentChecker\DcpConnectionChecker.cs (3)
202
private readonly
IProcessExecution
_process;
209
private DcpConnectionTestSession(
IProcessExecution
process, string sessionDirectory, string kubeconfigPath, OutputCollector output, ILogger logger)
232
IProcessExecution
? process = null;
Utils\EnvironmentChecker\DevCertsCheck.cs (2)
414
await using
var
process = processExecutionFactory.CreateExecution(
464
private static void TryKillProcess(
IProcessExecution
process)
Aspire.Cli.Tests (47)
Commands\AppHostLauncherTests.cs (9)
867
harness.ProcessFactory.StartHandler = (_, _, _, _, _, _) => Task.FromResult<
IProcessExecution
>(execution);
909
harness.ProcessFactory.StartHandler = (_, _, _, _, _, _) => Task.FromResult<
IProcessExecution
>(execution);
1460
public Func<string, IReadOnlyList<string>, string, Func<string, bool>?, IReadOnlyDictionary<string, string>?, CancellationToken, Task<
IProcessExecution
>>? StartHandler { get; set; }
1471
public
IProcessExecution
CreateExecution(string fileName, string[] args, IDictionary<string, string>? env, DirectoryInfo workingDirectory, ProcessInvocationOptions options)
1478
public
IProcessExecution
CreateExecution(ProcessStartInfo startInfo, ProcessInvocationOptions options)
1490
private Task<
IProcessExecution
> StartCoreAsync(
1516
return Task.FromResult<
IProcessExecution
>(new MonitoredProcessExecutionAdapter(StartedProcess));
1587
private
IProcessExecution
? _inner;
1607
private
IProcessExecution
Inner =>
Commands\StartCommandTests.cs (2)
718
public
IProcessExecution
CreateExecution(string fileName, string[] args, IDictionary<string, string>? env, DirectoryInfo workingDirectory, ProcessInvocationOptions options)
729
public
IProcessExecution
CreateExecution(ProcessStartInfo startInfo, ProcessInvocationOptions options)
DotNet\OwnedProcessExecutionTests.cs (1)
27
await using
var
execution = factory.CreateExecution(
DotNet\ProcessExecutionDetachedTests.cs (4)
22
await using
var
child = CreateDetachedExecution(
63
await using
var
child = CreateDetachedExecution(
82
await using
var
detachedProcess = CreateDetachedExecution(
119
private static
IProcessExecution
CreateDetachedExecution(
DotNet\ProcessExecutionFactoryEnvironmentTests.cs (5)
31
await using
var
execution = CreateFactory().CreateExecution(startInfo, new ProcessInvocationOptions
89
await using
var
execution = CreateFactory().CreateExecution(startInfo, new ProcessInvocationOptions
117
await using
var
execution = CreateFactory().CreateExecution(
138
await using
var
execution = CreateFactory().CreateExecution(startInfo, new ProcessInvocationOptions());
149
await using
var
execution = CreateFactory().CreateExecution(
DotNet\ProcessExecutionTests.cs (7)
35
var
execution = lifetime.Instance;
72
var
execution = lifetime.Instance;
112
var
execution = lifetime.Instance;
149
var
execution = lifetime.Instance;
228
await using
var
execution = TestProcessExecutionFactory.CreateForCliGuardian(new TestEnvironment()).CreateExecution(
346
private static
IProcessExecution
CreateExecution(
361
private static
IProcessExecution
CreateExecution(
Layout\LayoutProcessRunnerTests.cs (5)
32
await using
var
execution = await runner.StartAsync("tool", ["arg"]);
60
await using
var
execution = await runner.StartAsync("tool", ["arg"], environmentVariables: environment);
86
await using
var
execution = await runner.StartAsync("tool", ["arg"], options: callerOptions, killOnParentExit: optInArgument);
106
await using
var
execution = await runner.StartAsync("tool", ["arg"], options: new ProcessInvocationOptions { Detached = true });
123
await using
var
execution = await runner.StartAsync("tool", ["arg"],
Projects\AppHostServerSessionTests.cs (5)
208
var
execution = executionFactory.CreateExecution(
551
private static
IProcessExecution
CreateServerExecution(ProcessStartInfo startInfo, AppHostServerRunControl? runControl)
678
public
IProcessExecution
? StartedExecution { get; private set; }
711
var
execution = CreateServerExecution(startInfo, runControl);
763
var
execution = CreateServerExecution(startInfo, runControl);
TestServices\TestProcessExecutionFactory.cs (9)
56
/// If this returns an <see cref="
IProcessExecution
"/>, that execution is returned directly.
58
public Func<string[], IDictionary<string, string>?, DirectoryInfo, ProcessInvocationOptions,
IProcessExecution
>? CreateExecutionCallback { get; set; }
60
public Func<string, string[], IDictionary<string, string>?, DirectoryInfo, ProcessInvocationOptions,
IProcessExecution
>? CreateExecutionWithFileNameCallback { get; set; }
61
public Func<System.Diagnostics.ProcessStartInfo, ProcessInvocationOptions,
IProcessExecution
>? CreateExecutionFromStartInfoCallback { get; set; }
94
public List<
IProcessExecution
> CreatedExecutions { get; } = [];
111
public
IProcessExecution
CreateExecution(string fileName, string[] args, IDictionary<string, string>? env, DirectoryInfo workingDirectory, ProcessInvocationOptions options)
126
var
execution = CreateExecutionWithFileNameCallback(fileName, args, env, workingDirectory, options);
134
var
execution = CreateExecutionCallback(args, env, workingDirectory, options);
150
public
IProcessExecution
CreateExecution(System.Diagnostics.ProcessStartInfo startInfo, ProcessInvocationOptions options)