8 implementations of IProcessExecution
aspire (1)
DotNet\ProcessExecution.cs (1)
19
internal sealed class ProcessExecution :
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)
2729
int exitCode) :
IProcessExecution
Telemetry\InternalMicrosoftDetectorTests.cs (1)
1838
IDictionary<string, string>? environment) :
IProcessExecution
TestServices\TestProcessExecutionFactory.cs (1)
139
internal sealed class TestProcessExecution :
IProcessExecution
97 references to IProcessExecution
aspire (45)
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)
416
IProcessExecution
process;
431
await using
var
_ = process;
DotNet\DotNetCliRunner.cs (2)
263
var
execution = executionFactory.CreateExecution(processFileName, effectiveArgs, finalEnv, workingDirectory, instrumentedOptions);
505
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\ProcessExecution.cs (2)
13
/// The single <see cref="
IProcessExecution
"/> implementation. Wraps an <see cref="IsolatedProcess"/>
15
/// spawned lazily on <see cref="
IProcessExecution
.StartAsync"/> so callers that build an execution but never start it (e.g.
DotNet\ProcessExecutionFactory.cs (3)
49
public
IProcessExecution
CreateExecution(string fileName, string[] args, IDictionary<string, string>? env, DirectoryInfo workingDirectory, ProcessInvocationOptions options)
103
public
IProcessExecution
CreateExecution(System.Diagnostics.ProcessStartInfo startInfo, ProcessInvocationOptions options)
203
private static
IProcessExecution
Build(
Layout\LayoutProcessRunner.cs (3)
51
await using
var
execution = executionFactory.CreateExecution(toolPath, args, effectiveEnvironment, workDir, options);
64
public async Task<
IProcessExecution
> StartAsync(
89
var
execution = executionFactory.CreateExecution(toolPath, args, effectiveEnvironment, workDir, effectiveOptions);
Profiling\ProfileCaptureService.cs (4)
99
IProcessExecution
dashboardProcess;
221
private readonly
IProcessExecution
_dashboardProcess;
234
IProcessExecution
dashboardProcess,
244
IProcessExecution
dashboardProcess,
Projects\AppHostServerSession.cs (5)
20
/// The session drives the child entirely through the <see cref="
IProcessExecution
"/> returned by
24
/// <see cref="
IProcessExecution
.WaitForExitAsync(CancellationToken)"/>; the execution runs the
53
private
IProcessExecution
? _execution;
114
/// published). Routes through the <see cref="
IProcessExecution
"/>, which encapsulates the
273
private static async Task DriveAsync(
IProcessExecution
execution, TaskCompletionSource<int> completion, CancellationToken stopToken)
Projects\DotNetBasedAppHostServerProject.cs (1)
678
IProcessExecution
execution = null!;
Projects\IAppHostServerProject.cs (6)
31
/// The started <see cref="
IProcessExecution
"/> that owns the server child. Callers observe state
32
/// (<see cref="
IProcessExecution
.HasExited"/>, <see cref="
IProcessExecution
.ExitCode"/>,
33
/// <see cref="
IProcessExecution
.ProcessId"/>), drive its lifetime via
34
/// <see cref="
IProcessExecution
.WaitForExitAsync(CancellationToken)"/> (which runs the shared
43
IProcessExecution
Execution);
Projects\PrebuiltAppHostServer.cs (1)
1365
IProcessExecution
execution = null!;
Projects\ProcessGuestLauncher.cs (1)
76
IProcessExecution
execution = null!;
Telemetry\InternalMicrosoftDetector.cs (1)
1136
await using
var
execution = _processExecutionFactory.CreateExecution(
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 (52)
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\ProcessExecutionDetachedTests.cs (10)
36
await using
var
child = CreateDetachedExecution(
89
await using
var
detachedProcess = CreateDetachedExecution(
158
IProcessExecution
? detachedProcess = null;
159
var
detachedExecution = CreateDetachedExecution(
237
await using
var
detachedProcess = CreateDetachedExecution(
279
await using
var
detachedProcess = CreateDetachedExecution(
337
await using
var
detachedProcess = CreateDetachedExecution(
389
await using
var
detachedProcess = CreateDetachedExecution(
440
var
detachedProcess = CreateDetachedExecution(
480
private static
IProcessExecution
CreateDetachedExecution(
DotNet\ProcessExecutionFactoryEnvironmentTests.cs (3)
35
await using
var
execution = CreateFactory().CreateExecution(
56
await using
var
execution = CreateFactory().CreateExecution(startInfo, new ProcessInvocationOptions());
67
await using
var
execution = CreateFactory().CreateExecution(
DotNet\ProcessExecutionTests.cs (9)
26
var
execution = CreateExecution(
59
await using
var
execution = CreateExecution(
118
await using
var
execution = CreateExecution(
164
await using
var
execution = CreateExecution(
194
await using
var
execution = CreateExecution(scriptFile, isolateConsole, signaler, shutdownService);
225
await using
var
execution = CreateExecution(scriptFile, isolateConsole, signaler, shutdownService);
255
await using
var
execution = CreateExecution(scriptFile, isolateConsole, signaler, shutdownService);
407
private static
IProcessExecution
CreateExecution(
422
private static
IProcessExecution
CreateExecution(
Layout\LayoutProcessRunnerTests.cs (6)
66
await using
var
execution = await runner.StartAsync("tool", ["arg"]);
86
await using
var
execution = await runner.StartAsync("tool", ["arg"], environmentVariables: callerEnv);
144
await using
var
execution = await runner.StartAsync("tool", ["arg"], killOnParentExit: true);
165
await using
var
execution = await runner.StartAsync("tool", ["arg"], options: callerOptions);
187
await using
var
execution = await runner.StartAsync("tool", ["arg"], options: callerOptions, killOnParentExit: true);
244
await using
var
execution = await runner.StartAsync("tool", ["arg"], killOnParentExit: true);
Projects\AppHostServerSessionTests.cs (4)
479
private static
IProcessExecution
CreateServerExecution(ProcessStartInfo startInfo, AppHostServerRunControl? runControl)
592
public
IProcessExecution
? StartedExecution { get; private set; }
623
var
execution = CreateServerExecution(startInfo, runControl);
672
var
execution = CreateServerExecution(startInfo, runControl);
TestServices\TestProcessExecutionFactory.cs (9)
22
/// If this returns an <see cref="
IProcessExecution
"/>, that execution is returned directly.
24
public Func<string[], IDictionary<string, string>?, DirectoryInfo, ProcessInvocationOptions,
IProcessExecution
>? CreateExecutionCallback { get; set; }
26
public Func<string, string[], IDictionary<string, string>?, DirectoryInfo, ProcessInvocationOptions,
IProcessExecution
>? CreateExecutionWithFileNameCallback { get; set; }
50
/// When set, the execution will use this exit code when <see cref="
IProcessExecution
.WaitForExitAsync"/> is called.
59
public List<
IProcessExecution
> CreatedExecutions { get; } = [];
76
public
IProcessExecution
CreateExecution(string fileName, string[] args, IDictionary<string, string>? env, DirectoryInfo workingDirectory, ProcessInvocationOptions options)
91
var
execution = CreateExecutionWithFileNameCallback(fileName, args, env, workingDirectory, options);
99
var
execution = CreateExecutionCallback(args, env, workingDirectory, options);
115
public
IProcessExecution
CreateExecution(System.Diagnostics.ProcessStartInfo startInfo, ProcessInvocationOptions options)