8 implementations of ProcessId
aspire (1)
DotNet\ProcessExecution.cs (1)
77public int ProcessId => Process.Id;
Aspire.Cli.Tests (7)
Commands\AppHostLauncherTests.cs (3)
1597public int ProcessId => Inner.ProcessId; 1636public int ProcessId { get; } = process.Id; 1709public int ProcessId => int.MaxValue - 12345;
Commands\StartCommandTests.cs (1)
745public int ProcessId => int.MaxValue - 1;
DotNet\DotNetCliRunnerTests.cs (1)
2740public int ProcessId => Environment.ProcessId;
Telemetry\InternalMicrosoftDetectorTests.cs (1)
1848public int ProcessId => Environment.ProcessId;
TestServices\TestProcessExecutionFactory.cs (1)
188public int ProcessId { get; init; } = Environment.ProcessId;
39 references to ProcessId
aspire (25)
Commands\AppHostLauncher.cs (10)
458spawnActivity.SetProcessId(childProcess.ProcessId); 484var childStableStartedAt = ProcessStartTimeHelper.TryGetProcessStartTimeUnixMilliseconds(childProcess.ProcessId); 485logger.LogDebug("Child CLI process started with PID: {PID}", childProcess.ProcessId); 492using var waitForBackchannelActivity = profilingTelemetry.StartDetachedWaitForBackchannel(childProcess.ProcessId); 518candidate => IsLaunchedByChildCli(candidate, childProcess.ProcessId, childStableStartedAt)); 520candidate => IsUnattributedAppHostAtPath(candidate, canonicalAppHostPath, childProcess.ProcessId, childStableStartedAt)); 650childProcess.ProcessId, 889DisplayChildLogTail(childLogFile, result.ChildProcess.ProcessId); 962var pid = appHostInfo?.ProcessId ?? result.ChildProcess!.ProcessId; 969result.ChildProcess!.ProcessId,
DotNet\DotNetCliRunner.cs (1)
301processActivity.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)
682_logger.LogTrace("AppHostServer({ProcessId}) stdout: {Line}", execution.ProcessId, line); 688_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)
1375_logger.LogDebug("PrebuiltAppHostServer({ProcessId}) stdout: {Line}", execution.ProcessId, line); 1385_logger.LogInformation("PrebuiltAppHostServer({ProcessId}) stderr: {Line}", execution.ProcessId, line);
Projects\ProcessGuestLauncher.cs (7)
80var pid = execution.ProcessId; 92var pid = execution.ProcessId; 148_logger.LogDebug("{Language} guest process {ProcessId} started: {Command}", _language, execution.ProcessId, resolvedCommand); 149activity?.SetTag(TelemetryConstants.Tags.ProcessPid, execution.ProcessId); 150AddEvent(activity, ProfilingTelemetry.Events.GuestProcessStarted, TelemetryConstants.Tags.ProcessPid, execution.ProcessId); 160_logger.LogInformation("Cancellation requested while waiting for {Language} guest process {ProcessId} to exit", _language, execution.ProcessId)); 178_logger.LogDebug("{Language} guest process {ProcessId} exited with code {ExitCode}", _language, execution.ProcessId, finalExitCode);
Aspire.Cli.Tests (14)
Commands\AppHostLauncherTests.cs (1)
1597public 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)
146WaitForProcessExit(project.StartedExecution!.ProcessId, TimeSpan.FromSeconds(30)),