8 implementations of IProcessExecution
aspire (1)
DotNet\ProcessExecution.cs (1)
19internal sealed class ProcessExecution : IProcessExecution
Aspire.Cli.Tests (7)
Commands\AppHostLauncherTests.cs (3)
1585ProcessInvocationOptions options) : IProcessExecution 1628private sealed class MonitoredProcessExecutionAdapter(Process process, Process? exitMonitorProcess = null, DateTimeOffset? startTime = null, bool useSuppliedStartTime = false) : IProcessExecution 1697private sealed class NonExitingProcessExecution : IProcessExecution
Commands\StartCommandTests.cs (1)
737private sealed class TestDetachedProcessExecution(Action onStart) : IProcessExecution
DotNet\DotNetCliRunnerTests.cs (1)
2729int exitCode) : IProcessExecution
Telemetry\InternalMicrosoftDetectorTests.cs (1)
1838IDictionary<string, string>? environment) : IProcessExecution
TestServices\TestProcessExecutionFactory.cs (1)
139internal sealed class TestProcessExecution : IProcessExecution
97 references to IProcessExecution
aspire (45)
Commands\AppHostLauncher.cs (5)
427private record LaunchResult(IProcessExecution? ChildProcess, IAppHostAuxiliaryBackchannel? Backchannel, DashboardUrlsState? DashboardUrls, bool ChildExitedEarly, int ChildExitCode, DateTimeOffset? ChildStartedAt = null); 438IProcessExecution? childProcess = null; 630private async ValueTask DisposeAfterFailedStartAsync(IProcessExecution? childProcess) 647private Task RequestGracefulShutdownThenForceKillAsync(IProcessExecution childProcess, DateTimeOffset? childStartedAt) 732private LaunchResult CreateChildExitedLaunchResult(IProcessExecution childProcess, ProfilingTelemetry.ActivityScope waitForBackchannelActivity, DateTimeOffset? childStartedAt)
Commands\DashboardRunCommand.cs (2)
416IProcessExecution process; 431await using var _ = process;
DotNet\DotNetCliRunner.cs (2)
263var execution = executionFactory.CreateExecution(processFileName, effectiveArgs, finalEnv, workingDirectory, instrumentedOptions); 505IProcessExecution? execution,
DotNet\IProcessExecutionFactory.cs (4)
19/// <returns>A configured <see cref="IProcessExecution"/> ready to be started.</returns> 20IProcessExecution CreateExecution( 37/// <returns>A configured <see cref="IProcessExecution"/> ready to be started.</returns> 38IProcessExecution 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)
49public IProcessExecution CreateExecution(string fileName, string[] args, IDictionary<string, string>? env, DirectoryInfo workingDirectory, ProcessInvocationOptions options) 103public IProcessExecution CreateExecution(System.Diagnostics.ProcessStartInfo startInfo, ProcessInvocationOptions options) 203private static IProcessExecution Build(
Layout\LayoutProcessRunner.cs (3)
51await using var execution = executionFactory.CreateExecution(toolPath, args, effectiveEnvironment, workDir, options); 64public async Task<IProcessExecution> StartAsync( 89var execution = executionFactory.CreateExecution(toolPath, args, effectiveEnvironment, workDir, effectiveOptions);
Profiling\ProfileCaptureService.cs (4)
99IProcessExecution dashboardProcess; 221private readonly IProcessExecution _dashboardProcess; 234IProcessExecution dashboardProcess, 244IProcessExecution 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 53private IProcessExecution? _execution; 114/// published). Routes through the <see cref="IProcessExecution"/>, which encapsulates the 273private static async Task DriveAsync(IProcessExecution execution, TaskCompletionSource<int> completion, CancellationToken stopToken)
Projects\DotNetBasedAppHostServerProject.cs (1)
678IProcessExecution 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 43IProcessExecution Execution);
Projects\PrebuiltAppHostServer.cs (1)
1365IProcessExecution execution = null!;
Projects\ProcessGuestLauncher.cs (1)
76IProcessExecution execution = null!;
Telemetry\InternalMicrosoftDetector.cs (1)
1136await using var execution = _processExecutionFactory.CreateExecution(
Utils\EnvironmentChecker\DcpConnectionChecker.cs (3)
202private readonly IProcessExecution _process; 209private DcpConnectionTestSession(IProcessExecution process, string sessionDirectory, string kubeconfigPath, OutputCollector output, ILogger logger) 232IProcessExecution? process = null;
Utils\EnvironmentChecker\DevCertsCheck.cs (2)
414await using var process = processExecutionFactory.CreateExecution( 464private static void TryKillProcess(IProcessExecution process)
Aspire.Cli.Tests (52)
Commands\AppHostLauncherTests.cs (9)
867harness.ProcessFactory.StartHandler = (_, _, _, _, _, _) => Task.FromResult<IProcessExecution>(execution); 909harness.ProcessFactory.StartHandler = (_, _, _, _, _, _) => Task.FromResult<IProcessExecution>(execution); 1460public Func<string, IReadOnlyList<string>, string, Func<string, bool>?, IReadOnlyDictionary<string, string>?, CancellationToken, Task<IProcessExecution>>? StartHandler { get; set; } 1471public IProcessExecution CreateExecution(string fileName, string[] args, IDictionary<string, string>? env, DirectoryInfo workingDirectory, ProcessInvocationOptions options) 1478public IProcessExecution CreateExecution(ProcessStartInfo startInfo, ProcessInvocationOptions options) 1490private Task<IProcessExecution> StartCoreAsync( 1516return Task.FromResult<IProcessExecution>(new MonitoredProcessExecutionAdapter(StartedProcess)); 1587private IProcessExecution? _inner; 1607private IProcessExecution Inner =>
Commands\StartCommandTests.cs (2)
718public IProcessExecution CreateExecution(string fileName, string[] args, IDictionary<string, string>? env, DirectoryInfo workingDirectory, ProcessInvocationOptions options) 729public IProcessExecution CreateExecution(ProcessStartInfo startInfo, ProcessInvocationOptions options)
DotNet\ProcessExecutionDetachedTests.cs (10)
36await using var child = CreateDetachedExecution( 89await using var detachedProcess = CreateDetachedExecution( 158IProcessExecution? detachedProcess = null; 159var detachedExecution = CreateDetachedExecution( 237await using var detachedProcess = CreateDetachedExecution( 279await using var detachedProcess = CreateDetachedExecution( 337await using var detachedProcess = CreateDetachedExecution( 389await using var detachedProcess = CreateDetachedExecution( 440var detachedProcess = CreateDetachedExecution( 480private static IProcessExecution CreateDetachedExecution(
DotNet\ProcessExecutionFactoryEnvironmentTests.cs (3)
35await using var execution = CreateFactory().CreateExecution( 56await using var execution = CreateFactory().CreateExecution(startInfo, new ProcessInvocationOptions()); 67await using var execution = CreateFactory().CreateExecution(
DotNet\ProcessExecutionTests.cs (9)
26var execution = CreateExecution( 59await using var execution = CreateExecution( 118await using var execution = CreateExecution( 164await using var execution = CreateExecution( 194await using var execution = CreateExecution(scriptFile, isolateConsole, signaler, shutdownService); 225await using var execution = CreateExecution(scriptFile, isolateConsole, signaler, shutdownService); 255await using var execution = CreateExecution(scriptFile, isolateConsole, signaler, shutdownService); 407private static IProcessExecution CreateExecution( 422private static IProcessExecution CreateExecution(
Layout\LayoutProcessRunnerTests.cs (6)
66await using var execution = await runner.StartAsync("tool", ["arg"]); 86await using var execution = await runner.StartAsync("tool", ["arg"], environmentVariables: callerEnv); 144await using var execution = await runner.StartAsync("tool", ["arg"], killOnParentExit: true); 165await using var execution = await runner.StartAsync("tool", ["arg"], options: callerOptions); 187await using var execution = await runner.StartAsync("tool", ["arg"], options: callerOptions, killOnParentExit: true); 244await using var execution = await runner.StartAsync("tool", ["arg"], killOnParentExit: true);
Projects\AppHostServerSessionTests.cs (4)
479private static IProcessExecution CreateServerExecution(ProcessStartInfo startInfo, AppHostServerRunControl? runControl) 592public IProcessExecution? StartedExecution { get; private set; } 623var execution = CreateServerExecution(startInfo, runControl); 672var execution = CreateServerExecution(startInfo, runControl);
TestServices\TestProcessExecutionFactory.cs (9)
22/// If this returns an <see cref="IProcessExecution"/>, that execution is returned directly. 24public Func<string[], IDictionary<string, string>?, DirectoryInfo, ProcessInvocationOptions, IProcessExecution>? CreateExecutionCallback { get; set; } 26public 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. 59public List<IProcessExecution> CreatedExecutions { get; } = []; 76public IProcessExecution CreateExecution(string fileName, string[] args, IDictionary<string, string>? env, DirectoryInfo workingDirectory, ProcessInvocationOptions options) 91var execution = CreateExecutionWithFileNameCallback(fileName, args, env, workingDirectory, options); 99var execution = CreateExecutionCallback(args, env, workingDirectory, options); 115public IProcessExecution CreateExecution(System.Diagnostics.ProcessStartInfo startInfo, ProcessInvocationOptions options)