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