8 implementations of IProcessExecution
aspire (1)
DotNet\ProcessExecution.cs (1)
19
internal sealed class ProcessExecution :
IProcessExecution
Aspire.Cli.Tests (7)
Commands\AppHostLauncherTests.cs (3)
1420
ProcessInvocationOptions options) :
IProcessExecution
1463
private sealed class MonitoredProcessExecutionAdapter(Process process, Process? exitMonitorProcess = null, DateTimeOffset? startTime = null, bool useSuppliedStartTime = false) :
IProcessExecution
1532
private sealed class NonExitingProcessExecution :
IProcessExecution
Commands\StartCommandTests.cs (1)
736
private sealed class TestDetachedProcessExecution(Action onStart) :
IProcessExecution
DotNet\DotNetCliRunnerTests.cs (1)
2680
int exitCode) :
IProcessExecution
Telemetry\InternalMicrosoftDetectorTests.cs (1)
607
IDictionary<string, string>? environment) :
IProcessExecution
TestServices\TestProcessExecutionFactory.cs (1)
139
internal sealed class TestProcessExecution :
IProcessExecution
96 references to IProcessExecution
aspire (45)
Commands\AppHostLauncher.cs (5)
475
private record LaunchResult(
IProcessExecution
? ChildProcess, IAppHostAuxiliaryBackchannel? Backchannel, DashboardUrlsState? DashboardUrls, bool ChildExitedEarly, int ChildExitCode, DateTimeOffset? ChildStartedAt = null);
487
IProcessExecution
? childProcess = null;
667
private async ValueTask DisposeAfterFailedStartAsync(
IProcessExecution
? childProcess)
684
private Task RequestGracefulShutdownThenForceKillAsync(
IProcessExecution
childProcess, DateTimeOffset? childStartedAt)
693
private LaunchResult CreateChildExitedLaunchResult(
IProcessExecution
childProcess, ProfilingTelemetry.ActivityScope waitForBackchannelActivity, DateTimeOffset? childStartedAt)
Commands\DashboardRunCommand.cs (2)
397
IProcessExecution
process;
412
await using
var
_ = process;
DotNet\DotNetCliRunner.cs (2)
256
var
execution = executionFactory.CreateExecution(processFileName, effectiveArgs, finalEnv, workingDirectory, instrumentedOptions);
493
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)
46
public
IProcessExecution
CreateExecution(string fileName, string[] args, IDictionary<string, string>? env, DirectoryInfo workingDirectory, ProcessInvocationOptions options)
100
public
IProcessExecution
CreateExecution(System.Diagnostics.ProcessStartInfo startInfo, ProcessInvocationOptions options)
200
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)
677
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)
1361
IProcessExecution
execution = null!;
Projects\ProcessGuestLauncher.cs (1)
81
IProcessExecution
execution = null!;
Telemetry\InternalMicrosoftDetector.cs (1)
768
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 (51)
Commands\AppHostLauncherTests.cs (8)
813
harness.ProcessFactory.StartHandler = (_, _, _, _, _, _) => Task.FromResult<
IProcessExecution
>(execution);
1295
public Func<string, IReadOnlyList<string>, string, Func<string, bool>?, IReadOnlyDictionary<string, string>?, CancellationToken, Task<
IProcessExecution
>>? StartHandler { get; set; }
1306
public
IProcessExecution
CreateExecution(string fileName, string[] args, IDictionary<string, string>? env, DirectoryInfo workingDirectory, ProcessInvocationOptions options)
1313
public
IProcessExecution
CreateExecution(ProcessStartInfo startInfo, ProcessInvocationOptions options)
1325
private Task<
IProcessExecution
> StartCoreAsync(
1351
return Task.FromResult<
IProcessExecution
>(new MonitoredProcessExecutionAdapter(StartedProcess));
1422
private
IProcessExecution
? _inner;
1442
private
IProcessExecution
Inner =>
Commands\StartCommandTests.cs (2)
717
public
IProcessExecution
CreateExecution(string fileName, string[] args, IDictionary<string, string>? env, DirectoryInfo workingDirectory, ProcessInvocationOptions options)
728
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)
477
private static
IProcessExecution
CreateServerExecution(ProcessStartInfo startInfo, AppHostServerRunControl? runControl)
590
public
IProcessExecution
? StartedExecution { get; private set; }
621
var
execution = CreateServerExecution(startInfo, runControl);
670
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)