8 implementations of ProcessId
aspire (1)
src\Shared\ChildProcess.cs (1)
77public int ProcessId
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)
2751public int ProcessId => Environment.ProcessId;
Telemetry\InternalMicrosoftDetectorTests.cs (1)
1848public int ProcessId => Environment.ProcessId;
TestServices\TestProcessExecutionFactory.cs (1)
227public int ProcessId { get; init; } = Environment.ProcessId;
40 references to ProcessId
aspire (28)
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)
299processActivity.AddDotNetProcessStartResult(started, started ? execution.ProcessId : null);
Projects\AppHostServerSession.cs (2)
145public int? ServerProcessId => _execution?.ProcessId; 237_activity.SetProcessId(result.Execution.ProcessId);
Projects\DotNetBasedAppHostServerProject.cs (2)
620_logger.LogDebug("AppHostServer({ProcessId}) stdout: {Line}", execution.ProcessId, line); 626_logger.LogDebug("AppHostServer({ProcessId}) stderr: {Line}", execution.ProcessId, line);
Projects\IAppHostServerProject.cs (1)
33/// <see cref="Aspire.Shared.IChildProcess.ProcessId"/>), drive its lifetime via
Projects\PrebuiltAppHostServer.cs (2)
1336_logger.LogDebug("PrebuiltAppHostServer({ProcessId}) stdout: {Line}", execution.ProcessId, line); 1344_logger.LogDebug("PrebuiltAppHostServer({ProcessId}) stderr: {Line}", execution.ProcessId, line);
Projects\ProcessGuestLauncher.cs (7)
82var pid = execution.ProcessId; 94var pid = execution.ProcessId; 151_logger.LogDebug("{Language} guest process {ProcessId} started: {Command}", _language, execution.ProcessId, resolvedCommand); 152activity?.SetTag(TelemetryConstants.Tags.ProcessPid, execution.ProcessId); 153AddEvent(activity, ProfilingTelemetry.Events.GuestProcessStarted, TelemetryConstants.Tags.ProcessPid, execution.ProcessId); 163_logger.LogInformation("Cancellation requested while waiting for {Language} guest process {ProcessId} to exit", _language, execution.ProcessId)); 181_logger.LogDebug("{Language} guest process {ProcessId} exited with code {ExitCode}", _language, execution.ProcessId, finalExitCode);
src\Shared\ProcessScope.cs (3)
20ArgumentOutOfRangeException.ThrowIfNegativeOrZero(execution.ProcessId); 21if (execution.ProcessId == Environment.ProcessId) 28ProcessId = execution.ProcessId;
Aspire.Cli.Tests (12)
Commands\AppHostLauncherTests.cs (1)
1597public int ProcessId => Inner.ProcessId;
DotNet\ProcessExecutionDetachedTests.cs (2)
69Assert.True(child.ProcessId > 0); 111$"pgid={detachedProcess.ProcessId.ToString(CultureInfo.InvariantCulture)}",
DotNet\ProcessExecutionTests.cs (8)
41Assert.Equal(enabled ? [execution.ProcessId] : Array.Empty<int>(), signaler.Pids); 71Assert.True(WaitForProcessExit(execution.ProcessId, TimeSpan.FromSeconds(10)), $"Expected process {execution.ProcessId} to exit after graceful signal."); 106Assert.True(WaitForProcessExit(execution.ProcessId, TimeSpan.FromSeconds(10)), $"Expected process {execution.ProcessId} to be killed after graceful expiration."); 132Assert.True(WaitForProcessExit(execution.ProcessId, TimeSpan.FromSeconds(10)), $"Expected process {execution.ProcessId} to be killed after signaler failure."); 216var signal = await SendCtrlCThroughAttachedConsoleAsync(execution.ProcessId);
Projects\AppHostServerSessionTests.cs (1)
163WaitForProcessExit(project.StartedExecution!.ProcessId, TimeSpan.FromSeconds(30)),