8 implementations of ProcessId
aspire (1)
DotNet\ProcessExecution.cs (1)
77public int ProcessId => Process.Id;
Aspire.Cli.Tests (7)
Commands\AppHostLauncherTests.cs (3)
1432public int ProcessId => Inner.ProcessId; 1471public int ProcessId { get; } = process.Id; 1544public int ProcessId => int.MaxValue - 12345;
Commands\StartCommandTests.cs (1)
744public int ProcessId => int.MaxValue - 1;
DotNet\DotNetCliRunnerTests.cs (1)
2691public int ProcessId => Environment.ProcessId;
Telemetry\InternalMicrosoftDetectorTests.cs (1)
617public int ProcessId => Environment.ProcessId;
TestServices\TestProcessExecutionFactory.cs (1)
188public int ProcessId { get; init; } = Environment.ProcessId;
36 references to ProcessId
aspire (22)
Commands\AppHostLauncher.cs (7)
507spawnActivity.SetProcessId(childProcess.ProcessId); 529logger.LogDebug("Child CLI process started with PID: {PID}", childProcess.ProcessId); 532using var waitForBackchannelActivity = profilingTelemetry.StartDetachedWaitForBackchannel(childProcess.ProcessId, expectedHash, legacyHashes.Count > 0); 687childProcess.ProcessId, 850DisplayChildLogTail(childLogFile, result.ChildProcess.ProcessId); 923var pid = appHostInfo?.ProcessId ?? result.ChildProcess!.ProcessId; 930result.ChildProcess!.ProcessId,
DotNet\DotNetCliRunner.cs (1)
289processActivity.AddDotNetProcessStartResult(started, started ? execution.ProcessId : null);
Projects\AppHostServerSession.cs (2)
148public int? ServerProcessId => _execution?.ProcessId; 240_activity.SetProcessId(result.Execution.ProcessId);
Projects\DotNetBasedAppHostServerProject.cs (2)
681_logger.LogTrace("AppHostServer({ProcessId}) stdout: {Line}", execution.ProcessId, line); 687_logger.LogTrace("AppHostServer({ProcessId}) stderr: {Line}", execution.ProcessId, line);
Projects\IAppHostServerProject.cs (1)
33/// <see cref="IProcessExecution.ProcessId"/>), drive its lifetime via
Projects\PrebuiltAppHostServer.cs (2)
1371_logger.LogDebug("PrebuiltAppHostServer({ProcessId}) stdout: {Line}", execution.ProcessId, line); 1381_logger.LogInformation("PrebuiltAppHostServer({ProcessId}) stderr: {Line}", execution.ProcessId, line);
Projects\ProcessGuestLauncher.cs (7)
85var pid = execution.ProcessId; 97var pid = execution.ProcessId; 153_logger.LogDebug("{Language} guest process {ProcessId} started: {Command}", _language, execution.ProcessId, resolvedCommandPath); 154activity?.SetTag(TelemetryConstants.Tags.ProcessPid, execution.ProcessId); 155AddEvent(activity, ProfilingTelemetry.Events.GuestProcessStarted, TelemetryConstants.Tags.ProcessPid, execution.ProcessId); 165_logger.LogInformation("Cancellation requested while waiting for {Language} guest process {ProcessId} to exit", _language, execution.ProcessId)); 183_logger.LogDebug("{Language} guest process {ProcessId} exited with code {ExitCode}", _language, execution.ProcessId, finalExitCode);
Aspire.Cli.Tests (14)
Commands\AppHostLauncherTests.cs (1)
1432public int ProcessId => Inner.ProcessId;
DotNet\ProcessExecutionDetachedTests.cs (4)
42Assert.True(child.ProcessId > 0); 105Assert.True(detachedProcess.ProcessId > 0); 178Assert.True(detachedProcess.ProcessId > 0); 292Assert.Equal(childPid, detachedProcess.ProcessId);
DotNet\ProcessExecutionTests.cs (8)
175Assert.True(WaitForProcessExit(execution.ProcessId, TimeSpan.FromSeconds(10)), $"Expected process {execution.ProcessId} to exit after cancellation."); 205Assert.True(WaitForProcessExit(execution.ProcessId, TimeSpan.FromSeconds(10)), $"Expected process {execution.ProcessId} to exit after graceful signal."); 240Assert.True(WaitForProcessExit(execution.ProcessId, TimeSpan.FromSeconds(10)), $"Expected process {execution.ProcessId} to be killed after graceful expiration."); 266Assert.True(WaitForProcessExit(execution.ProcessId, TimeSpan.FromSeconds(10)), $"Expected process {execution.ProcessId} to be killed after signaler failure.");
Projects\AppHostServerSessionTests.cs (1)
144WaitForProcessExit(project.StartedExecution!.ProcessId, TimeSpan.FromSeconds(30)),