81 instantiations of Process
ArgumentForwarding.Tests (1)
ArgumentForwardingTests.cs (1)
249var proc = new Process
aspire (4)
DotNet\DotNetCliRunner.cs (1)
590var process = new Process { StartInfo = startInfo };
DotNet\DotNetSdkInstaller.cs (3)
63using var process = new Process 181var installProcess = new Process 355var process = new Process
Aspire.Cli.Tests (1)
Utils\TemporaryRepo.cs (1)
21using var process = new Process
Aspire.EndToEnd.Tests (2)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
176AppHostProcess = new Process();
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
228return new Process
Aspire.Hosting (1)
Dcp\Process\ProcessUtil.cs (1)
22var process = new System.Diagnostics.Process()
Aspire.Hosting.Azure (1)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
22var process = new System.Diagnostics.Process()
Aspire.Hosting.DevTunnels (1)
DevTunnelCli.cs (1)
237using var process = new Process
Aspire.Hosting.Tests (1)
MSBuildTests.cs (1)
213using var process = new Process();
Aspire.Templates.Tests (2)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
176AppHostProcess = new Process();
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
228return new Process
AspireWithNode.AppHost (1)
DevCertHostingExtensions.cs (1)
124var exportProcess = new Process { StartInfo = exportStartInfo };
dotnet (3)
CommandFactory\CommandFactoryUsingResolver.cs (1)
118var _process = new Process
Commands\Help\HelpCommand.cs (1)
77return new Process
Installer\Windows\InstallClientElevationContext.cs (1)
45_serverProcess = new Process
dotnet-format (1)
Utilities\ProcessRunner.cs (1)
76var process = new Process();
dotnet-svcutil-lib (1)
Shared\Utilities\ProcessRunner.cs (1)
68using (var proc = new Process())
dotnet-user-jwts (1)
src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (1)
78using var process = new Process()
dotnet-user-secrets (1)
src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (1)
78using var process = new Process()
dotnet-watch (1)
Process\ProcessRunner.cs (1)
164var process = new Process
dotnet-watch.Tests (1)
TestUtilities\AwaitableProcess.cs (1)
43_process = new Process
HelixTestRunner (1)
ProcessUtil.cs (1)
84using var process = new Process()
Interop.FunctionalTests (1)
H2SpecCommands.cs (1)
218using (var process = new Process())
InteropTests (2)
Helpers\ClientProcess.cs (1)
23_process = new Process();
Helpers\WebsiteProcess.cs (1)
28_process = new Process();
Microsoft.Arcade.Common (1)
Command.cs (1)
43_process = new Process()
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (1)
381 using (var launchBrowser = new Process())
Microsoft.AspNetCore.Components.WebView.Wpf (1)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (1)
381 using (var launchBrowser = new Process())
Microsoft.AspNetCore.Components.WebViewE2E.Test (1)
WebViewManagerE2ETests.cs (1)
28var photinoProcess = new Process()
Microsoft.AspNetCore.Server.IntegrationTesting (6)
ApplicationPublisher.cs (1)
64var hostProcess = new Process() { StartInfo = startInfo };
Deployers\NginxDeployer.cs (3)
114using (var process = new Process 169using (var runNginx = new Process() { StartInfo = startInfo }) 211using (var runNginx = new Process() { StartInfo = startInfo })
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (1)
247using (var runScriptsOnRemoteServerProcess = new Process() { StartInfo = startInfo })
Deployers\SelfHostDeployer.cs (1)
145HostProcess = new Process() { StartInfo = startInfo };
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
IISExpressDeployer.cs (1)
193var process = new Process() { StartInfo = startInfo };
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
Docker.cs (1)
198var process = new Process
Microsoft.AspNetCore.WebSockets.ConformanceTests (1)
Autobahn\Executable.cs (1)
35var process = new Process()
Microsoft.Build.CommandLine.UnitTests (2)
XMake_Tests.cs (2)
589using Process process = new() 633using Process process = new()
Microsoft.Build.UnitTests.Shared (1)
RunnerUtilities.cs (1)
131using (var p = new Process { EnableRaisingEvents = true, StartInfo = psi })
Microsoft.Build.Utilities.Core (1)
ToolTask.cs (1)
745proc = new Process();
Microsoft.Build.Utilities.UnitTests (1)
ToolTask_Tests.cs (1)
745Process customProcess = new Process();
Microsoft.CodeAnalysis.InteractiveHost (1)
Interactive\Core\InteractiveHost.LazyRemoteService.cs (1)
138var newProcess = new Process
Microsoft.CodeAnalysis.Test.Utilities (2)
FX\ProcessUtilities.cs (2)
58using (var process = new Process { StartInfo = startInfo }) 115Process p = new Process { StartInfo = startInfo };
Microsoft.DotNet.Arcade.Sdk.Tests (1)
Utilities\TestApp.cs (1)
87var process = new Process
Microsoft.DotNet.Build.Tasks.Feed (1)
src\common\GeneralUtils.cs (1)
277Process process = new Process
Microsoft.DotNet.Cli.Utils (2)
Extensions\ProcessStartInfoExtensions.cs (2)
17var process = new Process 40var process = new Process
Microsoft.DotNet.Cli.Utils.Tests (1)
ProcessExtensionsTests.cs (1)
22using Process childProcess = new();
Microsoft.DotNet.Internal.SymbolHelper (1)
SymbolUploadHelper.cs (1)
442using Process process = new()
Microsoft.DotNet.MacOsPkg.Core (1)
ExecuteHelper.cs (1)
23using (Process process = new Process { StartInfo = processStartInfo })
Microsoft.DotNet.RemoteExecutor (1)
RemoteExecutor.cs (1)
477return new RemoteInvokeHandle(options.Start ? Process.Start(psi) : new Process() { StartInfo = psi },
Microsoft.DotNet.SetupNugetSources.Tests (1)
ScriptRunner.cs (1)
63var process = new Process
Microsoft.DotNet.SignTool (1)
src\RealSignTool.cs (1)
58using (var process = new Process())
Microsoft.Extensions.AI.Templates.Tests (1)
Infrastructure\TestCommand.cs (1)
55using var process = new Process
Microsoft.ML.CodeGenerator (3)
Utils.cs (3)
195var proc = new System.Diagnostics.Process(); 221var proc = new System.Diagnostics.Process(); 242var proc = new System.Diagnostics.Process();
Microsoft.ML.Sweeper (1)
ConfigRunner.cs (1)
226var p = new System.Diagnostics.Process
Microsoft.NET.Build.Containers (1)
LocalDaemons\DockerCli.cs (1)
203Process proc = new()
Microsoft.NET.Sdk.Publish.Tasks (1)
Tasks\GenerateEFSQLScripts.cs (1)
106proc = new Process
Microsoft.NET.TestFramework (1)
Commands\SdkCommandSpec.cs (1)
31var process = new Process()
PrepareTests (1)
TestDiscovery.cs (1)
76var worker = new Process();
PresentationUI (2)
InstallationError.xaml.cs (1)
211Process Notepad = new Process();
TenFeetInstallationError.xaml.cs (1)
215Process Notepad = new Process();
Roslyn.Test.Performance.Utilities (1)
TestUtilities.cs (1)
132var process = new Process
RunTests (1)
ProcessRunner.cs (1)
84var process = new Process();
SDDLTests (1)
Program.cs (1)
344Process p = new()
System.Diagnostics.Process (5)
System\Diagnostics\Process.cs (4)
1042return new Process(machineName, ProcessManager.IsRemoteMachine(machineName), processId, null); 1104processes[i] = new Process(machineName, isRemoteMachine, processInfo.ProcessId, processInfo); 1119return new Process(".", false, Environment.ProcessId, null); 1350Process process = new Process();
System\Diagnostics\Process.Linux.cs (1)
42processes.Add(new Process(machineName, isRemoteMachine: false, pid, processInfo));
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.PingUtility.cs (1)
48return new Process() { StartInfo = psi };
System.Windows.Forms.IntegrationTests.Common (1)
TestHelpers.cs (1)
111Process process = new();
System.Windows.Forms.Tests (1)
System\Windows\Forms\InputLanguageTests.cs (1)
214using Process process = new();
1103 references to Process
ArgumentForwarding.Tests (1)
ArgumentForwardingTests.cs (1)
249var proc = new Process
aspire (13)
Backchannel\FailedToConnectBackchannelConnection.cs (2)
8internal sealed class FailedToConnectBackchannelConnection(string message, Process process, Exception innerException) : Exception(message, innerException) 10public Process Process => process;
Commands\UpdateCommand.cs (2)
341using var process = Process.Start(psi);
DotNet\DotNetCliRunner.cs (4)
65var startTime = Process.GetCurrentProcess().StartTime; 590var process = new Process { StartInfo = startInfo }; 650async Task ForwardStreamToLoggerAsync(StreamReader reader, string identifier, Process process, Action<string>? lineCallback, CancellationToken cancellationToken) 673private async Task StartBackchannelAsync(Process? process, string socketPath, TaskCompletionSource<IAppHostBackchannel> backchannelCompletionSource, CancellationToken cancellationToken)
DotNet\DotNetSdkInstaller.cs (3)
63using var process = new Process 181var installProcess = new Process 355var process = new Process
Utils\CliDownloader.cs (2)
132using var process = Process.Start(psi);
Aspire.Cli.Tests (1)
Utils\TemporaryRepo.cs (1)
21using var process = new Process
Aspire.EndToEnd.Tests (5)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
26public Process? AppHostProcess { get; private set; }
tests\Shared\TemplatesTesting\TestExtensions.cs (2)
20public static bool TryGetHasExited(this Process process) 32public static void CloseAndKillProcessIfRunning(this Process process)
tests\Shared\TemplatesTesting\ToolCommand.cs (2)
19public Process? CurrentProcess { get; private set; } 208private Process CreateProcess(string executable, string args)
Aspire.Hosting (7)
Cli\CliOrphanDetector.cs (3)
16return !Process.GetProcessById(pid).HasExited; 29var process = Process.GetProcessById(pid);
Dashboard\DashboardEventHandlers.cs (1)
98var mainModule = Process.GetCurrentProcess().MainModule;
Dcp\Process\ProcessUtil.cs (3)
22var process = new System.Diagnostics.Process() 126private readonly System.Diagnostics.Process _process; 130public ProcessDisposable(System.Diagnostics.Process process, Task processLifetimeTask, bool entireProcessTree)
Aspire.Hosting.Azure (3)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (3)
22var process = new System.Diagnostics.Process() 126private readonly System.Diagnostics.Process _process; 130public ProcessDisposable(System.Diagnostics.Process process, Task processLifetimeTask, bool entireProcessTree)
Aspire.Hosting.DevTunnels (1)
DevTunnelCli.cs (1)
237using var process = new Process
Aspire.Hosting.Maui (2)
Utilities\ProjectFileReader.cs (2)
70using var process = Process.Start(startInfo);
Aspire.Hosting.Python (2)
PythonVersionDetector.cs (2)
73using var process = Process.Start(startInfo);
Aspire.Hosting.Python.Tests (4)
AddPythonAppTests.cs (4)
311var createVirtualEnvironmentProcess = Process.Start(prepareVirtualEnvironmentStartInfo); 341var installRequirementsProcess = Process.Start(installRequirementsStartInfo);
Aspire.Hosting.Tests (3)
MSBuildTests.cs (1)
213using var process = new Process();
Utils\DockerUtils.cs (2)
19if (Process.Start("docker", $"volume rm {volumeName}") is { } process) 35if (Process.Start("docker", $"volume inspect {volumeName}") is { } process)
Aspire.Templates.Tests (5)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
26public Process? AppHostProcess { get; private set; }
tests\Shared\TemplatesTesting\TestExtensions.cs (2)
20public static bool TryGetHasExited(this Process process) 32public static void CloseAndKillProcessIfRunning(this Process process)
tests\Shared\TemplatesTesting\ToolCommand.cs (2)
19public Process? CurrentProcess { get; private set; } 208private Process CreateProcess(string executable, string args)
AspireWithNode.AppHost (1)
DevCertHostingExtensions.cs (1)
124var exportProcess = new Process { StartInfo = exportStartInfo };
BuildValidator (1)
CompilationDiff.cs (1)
353Process.Start(new ProcessStartInfo
ClientSample (2)
Program.cs (1)
17Console.WriteLine($"Ready for debugger to attach. Process ID: {Process.GetCurrentProcess().Id}");
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
csc (5)
src\Compilers\CSharp\csc\Program.cs (1)
31using var logger = new CompilerServerLogger($"csc {Process.GetCurrentProcess().Id}");
src\Compilers\Shared\BuildServerConnection.cs (3)
126var process = Process.GetProcessById(shutdownBuildResponse.ServerProcessId); 624if (Process.Start(startInfo) is { } process)
src\Compilers\Shared\CompilerServerLogger.cs (1)
126var processId = Process.GetCurrentProcess().Id;
dotnet (18)
BuildServerConnection.cs (3)
126var process = Process.GetProcessById(shutdownBuildResponse.ServerProcessId); 624if (Process.Start(startInfo) is { } process)
CommandFactory\CommandFactoryUsingResolver.cs (1)
118var _process = new Process
Commands\Clean\FileBasedAppArtifacts\CleanFileBasedAppArtifactsCommand.cs (1)
140Process.Start(startInfo);
Commands\Help\HelpCommand.cs (2)
45public static Process ConfigureProcess(string docUrl) 90var process = ConfigureProcess(docsLink);
Commands\Test\MTP\TestApplication.cs (2)
51using var process = Process.Start(processStartInfo)!;
Commands\Workload\Install\MsiInstallerBase.cs (1)
70protected static bool IsParentProcessRunning => Process.GetProcessById(ParentProcess.Id) != null;
CompilerServerLogger.cs (1)
126var processId = Process.GetCurrentProcess().Id;
Installer\Windows\InstallClientElevationContext.cs (1)
21private Process _serverProcess;
Installer\Windows\InstallerBase.cs (3)
30public static readonly Process CurrentProcess; 75public static readonly Process ParentProcess; 198CurrentProcess = Process.GetCurrentProcess();
PerformanceLogEventSource.cs (2)
50Process currentProcess = Process.GetCurrentProcess();
Program.cs (1)
44TimeSpan startupTime = mainTimeStamp - Process.GetCurrentProcess().StartTime;
dotnet.Tests (10)
CommandTests\Help\GivenThatIWantToShowHelpForDotnetCommand.cs (3)
109var proc = HelpCommand.ConfigureProcess("https://aka.ms/dotnet-build"); 117var proc = HelpCommand.ConfigureProcess("https://aka.ms/dotnet-build"); 125var proc = HelpCommand.ConfigureProcess("https://aka.ms/dotnet-build");
CommandTests\Run\GivenDotnetRunIsInterrupted.cs (7)
33Process testProcess = null; 93Process child = null; 95Process testProcess = null; 112child = Process.GetProcessById(pid); 154Process child = null; 155Process testProcess = null; 173child = Process.GetProcessById(pid);
dotnet-dependency-context-test (1)
Program.cs (1)
17Console.WriteLine($"Process ID: {System.Diagnostics.Process.GetCurrentProcess().Id}");
dotnet-dev-certs (23)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (12)
104using (var process = Process.Start(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)) 159using var checkTrustProcess = Process.Start(new ProcessStartInfo( 214using var process = Process.Start(processInfo); 257using (var process = Process.Start(processInfo)) 288using var findCertificateProcess = Process.Start(new ProcessStartInfo( 358using (var process = Process.Start(processInfo))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (10)
585using var process = Process.Start(startInfo)!; 614using var process = Process.Start(startInfo)!; 638using var process = Process.Start(startInfo)!; 810using var process = Process.Start(processInfo); 854using var process = Process.Start(processInfo);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
dotnet-format (8)
Utilities\ProcessRunner.cs (8)
10public Process Process { get; } 15public ProcessResult(Process process, int exitCode, ReadOnlyCollection<string> outputLines, ReadOnlyCollection<string> errorLines) 26public Process Process { get; } 32public ProcessInfo(Process process, ProcessStartInfo startInfo, Task<ProcessResult> result) 46Process.Start(file); 58Action<Process>? onProcessStartHandler = null, 69Action<Process>? onProcessStartHandler = null, 76var process = new Process();
dotnet-getdocument (3)
Exe.cs (2)
39using var process = Process.Start(startInfo);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
dotnet-new.IntegrationTests (2)
CommonTemplatesTests.cs (2)
152var process = Process.Start(new ProcessStartInfo()
dotnet-openapi (3)
Commands\BaseCommand.cs (2)
230using var process = Process.Start(startInfo);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
dotnet-sql-cache (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
dotnet-svcutil-lib (6)
Shared\Utilities\DebugUtils.cs (2)
42var process = Process.GetCurrentProcess();
Shared\Utilities\ProcessRunner.cs (2)
68using (var proc = new Process()) 150var exitCode = Path.GetFileName(processName) == Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName) ? proc.ExitCode : -1;
Shared\Utilities\SafeLogger.cs (2)
25return $"[{Process.GetCurrentProcess().Id}.{startTime.Millisecond}] {message}"; 31return $"[{Process.GetCurrentProcess().Id}.{startTime.Millisecond}] Time elapsed: {DateTime.Now - startTime}";
dotnet-user-jwts (2)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (1)
78using var process = new Process()
dotnet-user-secrets (2)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (1)
78using var process = new Process()
dotnet-watch (11)
Browser\BrowserLauncher.cs (2)
95using var browserProcess = Process.Start(info);
BrowserRefreshServer.cs (2)
89using var process = Process.Start(dotnetPath, "dev-certs https --check --quiet");
Process\ProcessRunner.cs (7)
39using var process = CreateProcess(processSpec, onOutput, state, logger); 162private static Process CreateProcess(ProcessSpec processSpec, Action<OutputLine>? onOutput, ProcessState state, ILogger logger) 164var process = new Process 235private async ValueTask TerminateProcessAsync(Process process, ProcessSpec processSpec, ProcessState state, ILogger logger, CancellationToken cancellationToken) 259private static async ValueTask<bool> WaitForExitAsync(Process process, ProcessState state, TimeSpan? timeout, ILogger logger, CancellationToken cancellationToken) 318private static void TerminateProcess(Process process, ProcessState state, ILogger logger, bool force) 340private static void TerminateWindowsProcess(Process process, ProcessState state, ILogger logger, bool force)
dotnet-watch.Tests (2)
TestUtilities\AwaitableProcess.cs (2)
22private Process _process; 27public Process Process => _process;
ExampleTask (2)
ExampleTask.cs (2)
19var currentProcess = Process.GetCurrentProcess();
ExceptionHandlerSample (1)
StartupWithWebSocket.cs (1)
38await context.Response.WriteAsync($"Not a web socket request. PID: {Process.GetCurrentProcess().Id}");
GetDocument.Insider (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
HelixTestRunner (5)
ProcessUtil.cs (5)
32var process = Process.GetCurrentProcess(); 47var process = Process.GetProcessById(pid); 84using var process = new Process()
IdeCoreBenchmarks (16)
ClassificationBenchmarks.cs (4)
46var restoreOperation = Process.Start("dotnet", $"restore /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1 /p:Deterministic=true /p:Optimize=true {_solutionPath}"); 60Console.WriteLine("Found Roslyn.sln: " + Process.GetCurrentProcess().Id); 76Console.WriteLine("Opening roslyn. Attach to: " + Process.GetCurrentProcess().Id);
FindReferencesBenchmarks.cs (4)
45var restoreOperation = Process.Start("dotnet", $"restore /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1 /p:Deterministic=true /p:Optimize=true {solutionPath}"); 59Console.WriteLine("Found Compilers.slnf: " + Process.GetCurrentProcess().Id); 75Console.WriteLine("Opening roslyn. Attach to: " + Process.GetCurrentProcess().Id);
IncrementalSourceGeneratorBenchmarks.cs (4)
48var restoreOperation = Process.Start("dotnet", $"restore /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1 /p:Deterministic=true /p:Optimize=true {_solutionPath}"); 62Console.WriteLine("Found Roslyn.sln: " + Process.GetCurrentProcess().Id); 77Console.WriteLine("Opening roslyn. Attach to: " + Process.GetCurrentProcess().Id);
NavigateToBenchmarks.cs (4)
49var restoreOperation = Process.Start("dotnet", $"restore /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1 /p:Deterministic=true /p:Optimize=true {_solutionPath}"); 63Console.WriteLine("Found Roslyn.sln: " + Process.GetCurrentProcess().Id); 78Console.WriteLine("Opening roslyn. Attach to: " + Process.GetCurrentProcess().Id);
IIS.FunctionalTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (2)
52var process = Process.Start(startInfo);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (5)
159var hostProcess = deploymentResult.HostProcess; 239var hostingProcesses = Process.GetProcessesByName("dotnet") 240.Concat(Process.GetProcessesByName("iisexpress")) 241.Concat(Process.GetProcessesByName("w3wp")); 246foreach (var hostingProcess in hostingProcesses)
IIS.LongTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (2)
52var process = Process.Start(startInfo);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (5)
159var hostProcess = deploymentResult.HostProcess; 239var hostingProcesses = Process.GetProcessesByName("dotnet") 240.Concat(Process.GetProcessesByName("iisexpress")) 241.Concat(Process.GetProcessesByName("w3wp")); 246foreach (var hostingProcess in hostingProcesses)
IIS.NewHandler.FunctionalTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (2)
52var process = Process.Start(startInfo);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (5)
159var hostProcess = deploymentResult.HostProcess; 239var hostingProcesses = Process.GetProcessesByName("dotnet") 240.Concat(Process.GetProcessesByName("iisexpress")) 241.Concat(Process.GetProcessesByName("w3wp")); 246foreach (var hostingProcess in hostingProcesses)
IIS.NewShim.FunctionalTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (2)
52var process = Process.Start(startInfo);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (5)
159var hostProcess = deploymentResult.HostProcess; 239var hostingProcesses = Process.GetProcessesByName("dotnet") 240.Concat(Process.GetProcessesByName("iisexpress")) 241.Concat(Process.GetProcessesByName("w3wp")); 246foreach (var hostingProcess in hostingProcesses)
IIS.ShadowCopy.Tests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (2)
52var process = Process.Start(startInfo);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (5)
159var hostProcess = deploymentResult.HostProcess; 239var hostingProcesses = Process.GetProcessesByName("dotnet") 240.Concat(Process.GetProcessesByName("iisexpress")) 241.Concat(Process.GetProcessesByName("w3wp")); 246foreach (var hostingProcess in hostingProcesses)
IISExpress.FunctionalTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (2)
52var process = Process.Start(startInfo);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (5)
159var hostProcess = deploymentResult.HostProcess; 239var hostingProcesses = Process.GetProcessesByName("dotnet") 240.Concat(Process.GetProcessesByName("iisexpress")) 241.Concat(Process.GetProcessesByName("w3wp")); 246foreach (var hostingProcess in hostingProcesses)
InteractiveHost.UnitTests (3)
InteractiveHostDesktopTests.cs (2)
260await Host.ExecuteFileAsync(typeof(Process).Assembly.Location); 263Assert.True(errorOut.StartsWith(typeof(Process).Assembly.Location + "(1,3):", StringComparison.Ordinal), "Error output should start with file name, line and column");
StressTests.cs (1)
34host.InteractiveHostProcessCreated += new Action<Process>(proc =>
Interop.FunctionalTests (3)
H2SpecCommands.cs (3)
92using (var process = Process.Start(processOptions)) 218using (var process = new Process())
InteropTests (11)
Helpers\ClientProcess.cs (1)
13private readonly Process _process;
Helpers\WebsiteProcess.cs (1)
14private readonly Process _process;
src\Shared\Process\ProcessEx.cs (5)
25private readonly Process _process; 36public ProcessEx(ITestOutputHelper output, Process proc, TimeSpan timeout) 69public Process Process => _process; 130var proc = Process.Start(startInfo);
src\Shared\Process\ProcessExtensions.cs (4)
16public static void KillTree(this Process process) => process.KillTree(_defaultTimeout); 18public static void KillTree(this Process process, TimeSpan timeout) 106var process = Process.Start(startInfo);
Microsoft.Arcade.Common (1)
Command.cs (1)
18private readonly Process _process;
Microsoft.AspNetCore.Components.WebAssembly.Server (5)
DebugProxyLauncher.cs (4)
77var debugProxyProcess = Process.Start(processStartInfo); 139private static void PassThroughConsoleOutput(Process process) 165private static void CompleteTaskWhenServerIsReady(Process aspNetProcess, bool isFirefox, TaskCompletionSource<string> taskCompletionSource)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (1)
381 using (var launchBrowser = new Process())
Microsoft.AspNetCore.Components.WebView.Wpf (1)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (1)
381 using (var launchBrowser = new Process())
Microsoft.AspNetCore.Components.WebViewE2E.Test (1)
WebViewManagerE2ETests.cs (1)
28var photinoProcess = new Process()
Microsoft.AspNetCore.DeveloperCertificates.XPlat (22)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (12)
104using (var process = Process.Start(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)) 159using var checkTrustProcess = Process.Start(new ProcessStartInfo( 214using var process = Process.Start(processInfo); 257using (var process = Process.Start(processInfo)) 288using var findCertificateProcess = Process.Start(new ProcessStartInfo( 358using (var process = Process.Start(processInfo))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (10)
585using var process = Process.Start(startInfo)!; 614using var process = Process.Start(startInfo)!; 638using var process = Process.Start(startInfo)!; 810using var process = Process.Start(processInfo); 854using var process = Process.Start(processInfo);
Microsoft.AspNetCore.Hosting.FunctionalTests (3)
ShutdownTests.cs (3)
130var process = Process.Start(startInfo); 134private static void WaitForExitOrKill(Process process)
Microsoft.AspNetCore.InternalTesting (4)
CollectDumpAttribute.cs (2)
31var process = Process.GetCurrentProcess();
DumpCollector\DumpCollector.cs (1)
11public static void Collect(Process process, string fileName)
DumpCollector\DumpCollector.Windows.cs (1)
16internal static void Collect(Process process, string outputFile)
Microsoft.AspNetCore.OpenApi.Build.Tests (3)
GenerateAdditionalXmlFilesForOpenApiTests.cs (2)
28using var process = Process.Start(startInfo);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (4)
ServerTests.cs (4)
70using var process = Process.Start(psi); 107using var process = Process.Start(psi);
Microsoft.AspNetCore.Server.IntegrationTesting (17)
ApplicationPublisher.cs (1)
64var hostProcess = new Process() { StartInfo = startInfo };
Common\ProcessLoggingExtensions.cs (1)
10public static void StartAndCaptureOutAndErrToLogger(this Process process, string prefix, ILogger logger)
Deployers\ApplicationDeployer.cs (1)
115protected void ShutDownIfAnyHostProcess(Process hostProcess)
Deployers\NginxDeployer.cs (3)
114using (var process = new Process 169using (var runNginx = new Process() { StartInfo = startInfo }) 211using (var runNginx = new Process() { StartInfo = startInfo })
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (1)
247using (var runScriptsOnRemoteServerProcess = new Process() { StartInfo = startInfo })
Deployers\SelfHostDeployer.cs (1)
20public Process HostProcess { get; private set; }
src\Shared\Process\ProcessEx.cs (5)
25private readonly Process _process; 36public ProcessEx(ITestOutputHelper output, Process proc, TimeSpan timeout) 69public Process Process => _process; 130var proc = Process.Start(startInfo);
src\Shared\Process\ProcessExtensions.cs (4)
16public static void KillTree(this Process process) => process.KillTree(_defaultTimeout); 18public static void KillTree(this Process process, TimeSpan timeout) 106var process = Process.Start(startInfo);
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (8)
IISDeployer.cs (2)
34public Process HostProcess { get; set; } 280HostProcess = Process.GetProcessById(workerProcess.ProcessId);
IISDeploymentResult.cs (2)
14public Process HostProcess { get; } 24Process hostProcess)
IISExpressDeployer.cs (3)
29private Process _hostProcess; 193var process = new Process() { StartInfo = startInfo }; 548private void GracefullyShutdownProcess(Process hostProcess)
ProcessTracker.cs (1)
54public static void Add(Process process)
Microsoft.AspNetCore.Server.Kestrel.Core (22)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (12)
104using (var process = Process.Start(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)) 159using var checkTrustProcess = Process.Start(new ProcessStartInfo( 214using var process = Process.Start(processInfo); 257using (var process = Process.Start(processInfo)) 288using var findCertificateProcess = Process.Start(new ProcessStartInfo( 358using (var process = Process.Start(processInfo))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (10)
585using var process = Process.Start(startInfo)!; 614using var process = Process.Start(startInfo)!; 638using var process = Process.Start(startInfo)!; 810using var process = Process.Start(processInfo); 854using var process = Process.Start(processInfo);
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (2)
Docker.cs (2)
196private static (Process, ConcurrentQueue<string>) RunProcess(string fileName, string arguments, string prefix, ILogger logger) 198var process = new Process
Microsoft.AspNetCore.SpaProxy (6)
SpaProxyLaunchManager.cs (6)
19private Process? _spaProcess; 199_spaProcess = Process.Start(info); 246var stopProcess = Process.Start(stopScriptInfo); 308var stopProcess = Process.Start(stopScriptInfo);
Microsoft.AspNetCore.SpaServices.Extensions (4)
Npm\NodeScriptRunner.cs (4)
19private Process? _npmProcess; 123private static Process LaunchNodeProcess(ProcessStartInfo startInfo, string commandName) 127var process = Process.Start(startInfo)!;
Microsoft.AspNetCore.StaticFiles.Tests (1)
StaticFileMiddlewareTests.cs (1)
53Process.Start("ln", $"-s \"/tmp/{Path.GetRandomFileName()}\" \"{badLink}\"").WaitForExit();
Microsoft.AspNetCore.WebSockets.ConformanceTests (2)
Autobahn\Executable.cs (2)
35var process = new Process() 72private static void Cancel(Process process, TaskCompletionSource<int> tcs)
Microsoft.Build (42)
BackEnd\BuildManager\BuildManager.cs (6)
446private void UpdatePriority(Process p, ProcessPriorityClass priority) 471IEnumerable<Process>? processes = _nodeManager?.GetProcesses(); 474foreach (Process p in processes) 483foreach (Process p in processes) 873/// <returns>Enumeration of <see cref="Process"/> objects that were valid during the time of call to this function.</returns> 874public IEnumerable<Process> GetWorkerProcesses()
BackEnd\Client\MSBuildClient.cs (1)
462using Process msbuildProcess = nodeLauncher.Start(_msbuildLocation, string.Join(" ", msBuildServerOptions), nodeId: 0);
BackEnd\Components\Communications\INodeLauncher.cs (1)
10Process Start(string msbuildLocation, string commandLineArgs, int nodeId);
BackEnd\Components\Communications\INodeManager.cs (1)
56IEnumerable<Process> GetProcesses();
BackEnd\Components\Communications\INodeProvider.cs (1)
91IEnumerable<Process> GetProcesses();
BackEnd\Components\Communications\NodeLauncher.cs (7)
38public Process Start(string msbuildLocation, string commandLineArgs, int nodeId) 48private Process StartInternal(string msbuildLocation, string commandLineArgs) 118Process process; 121process = Process.Start(processStartInfo); 190return Process.GetProcessById(childProcessId); 194private static Process DisableMSBuildServer(Func<Process> func)
BackEnd\Components\Communications\NodeManager.cs (1)
360public IEnumerable<Process> GetProcesses()
BackEnd\Components\Communications\NodeProviderInProc.cs (1)
471public IEnumerable<Process> GetProcesses() => throw new NotImplementedException();
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (1)
209public IEnumerable<Process> GetProcesses()
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (14)
149List<Process> nodeProcesses = GetPossibleRunningNodes().nodeProcesses.ToList(); 155nodeProcesses.AddRange(Process.GetProcessesByName(Path.GetFileNameWithoutExtension(msbuildtaskhostExeName))); 158foreach (Process nodeProcess in nodeProcesses) 224ConcurrentQueue<Process> possibleRunningNodes = null; 229IList<Process> possibleRunningNodesList; 231possibleRunningNodes = new ConcurrentQueue<Process>(possibleRunningNodesList); 267while (possibleRunningNodes != null && possibleRunningNodes.TryDequeue(out var nodeToReuse)) 338Process msbuildProcess = nodeLauncher.Start(msbuildLocation, commandLineArgs, nodeId); 382void CreateNodeContext(int nodeId, Process nodeToReuse, Stream nodeStream) 398private (string expectedProcessName, IList<Process> nodeProcesses) GetPossibleRunningNodes(string msbuildLocation = null) 407var processes = Process.GetProcessesByName(expectedProcessName); 580private readonly Process _process; 582internal Process Process { get { return _process; } } 656Process process,
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
724public IEnumerable<Process> GetProcesses() => _nodeContexts.Values.Select(context => context.Process);
BackEnd\Components\Communications\TaskHostNodeManager.cs (1)
183IEnumerable<Process> INodeManager.GetProcesses()
BackEnd\Node\OutOfProcNode.cs (2)
871using Process currentProcess = Process.GetCurrentProcess();
CommunicationsUtilities.cs (2)
217using var currentProcess = Process.GetCurrentProcess();
Evaluation\ProjectRootElementCache.cs (1)
676Trace.WriteLine($"{prefix} {Process.GetCurrentProcess().Id} | {message}{param1}");
ProcessExtensions.cs (1)
12public static void KillTree(this Process process, int timeoutMilliseconds)
Microsoft.Build.CommandLine.UnitTests (10)
MSBuildServer_Tests.cs (6)
54Pid = Process.GetCurrentProcess().Id; 117Process.GetProcessById(pidOfServerProcess).KillTree(1000); 248var serverProcess = Process.GetProcessById(pidOfServerProcess); 299var serverProcess = Process.GetProcessById(pidOfServerProcess);
ProcessExtensions.cs (1)
12public static void KillTree(this Process process, int timeoutMilliseconds)
XMake_Tests.cs (3)
589using Process process = new() 633using Process process = new() 1564ProcessPriorityClass currentPriority = Process.GetCurrentProcess().PriorityClass;
Microsoft.Build.Engine.OM.UnitTests (1)
ProcessExtensions.cs (1)
12public static void KillTree(this Process process, int timeoutMilliseconds)
Microsoft.Build.Engine.UnitTests (24)
BackEnd\BuildManager_Tests.cs (8)
346int numberProcsOriginally = (new List<Process>(Process.GetProcessesByName("MSBuild"))).Count; 350string shutdownProjectDirectory = Path.Combine(Path.GetTempPath(), String.Format(CultureInfo.InvariantCulture, "VSNodeShutdown_{0}_UnitTest", Process.GetCurrentProcess().Id)); 377int numberProcsAfterBuild = (new List<Process>(Process.GetProcessesByName("MSBuild"))).Count; 388int numberProcsAfterShutdown = (new List<Process>(Process.GetProcessesByName("MSBuild"))).Count; 454Assert.NotEqual(Process.GetCurrentProcess().Id, processId); // "Build is expected to be out-of-proc. In fact it was in-proc."
BackEnd\ProcessIdTask.cs (1)
25Pid = Process.GetCurrentProcess().Id;
BackEnd\ProcessIdTaskSidecar.cs (1)
25Pid = Process.GetCurrentProcess().Id;
BackEnd\SdkResultOutOfProc_Tests.cs (1)
179processId.ShouldNotBe(Process.GetCurrentProcess().Id);
BackEnd\TaskHostFactory_Tests.cs (10)
78Process.GetCurrentProcess().Id.ShouldNotBe(pid); 84Process taskHostNode = Process.GetProcessById(pid); 97Process taskHostNode = Process.GetProcessById(pid); 152Process.GetCurrentProcess().Id.ShouldNotBe(pid); 156Process transientTaskHostNode = Process.GetProcessById(pid); 168Process sidecarTaskHostNode = Process.GetProcessById(pidSidecar);
Evaluation\Expander_Tests.cs (1)
2631Assert.Equal(System.Diagnostics.Process.GetCurrentProcess().Id, pid);
TestAssets\ExampleNetTask\ExampleTask\ExampleTask.cs (2)
19var currentProcess = Process.GetCurrentProcess();
Microsoft.Build.Framework (10)
EnvironmentUtilities.cs (6)
40using Process currentProcess = Process.GetCurrentProcess(); 72using Process currentProcess = Process.GetCurrentProcess(); 90using Process currentProcess = Process.GetCurrentProcess();
NativeMethods.cs (4)
1313Process thisProcess; 1316thisProcess = Process.GetProcessById(processIdToKill); 1449foreach (Process possibleChildProcess in Process.GetProcesses())
Microsoft.Build.Framework.UnitTests (1)
ProcessExtensions.cs (1)
12public static void KillTree(this Process process, int timeoutMilliseconds)
Microsoft.Build.Tasks.CodeAnalysis (5)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
509using var innerLogger = new CompilerServerLogger($"MSBuild {Process.GetCurrentProcess().Id}");
src\Compilers\Shared\BuildServerConnection.cs (3)
126var process = Process.GetProcessById(shutdownBuildResponse.ServerProcessId); 624if (Process.Start(startInfo) is { } process)
src\Compilers\Shared\CompilerServerLogger.cs (1)
126var processId = Process.GetCurrentProcess().Id;
Microsoft.Build.Tasks.CodeAnalysis.Sdk (5)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
509using var innerLogger = new CompilerServerLogger($"MSBuild {Process.GetCurrentProcess().Id}");
src\Compilers\Shared\BuildServerConnection.cs (3)
126var process = Process.GetProcessById(shutdownBuildResponse.ServerProcessId); 624if (Process.Start(startInfo) is { } process)
src\Compilers\Shared\CompilerServerLogger.cs (1)
126var processId = Process.GetCurrentProcess().Id;
Microsoft.Build.Tasks.Core (4)
CommunicationsUtilities.cs (2)
217using var currentProcess = Process.GetCurrentProcess();
ManifestUtil\SecurityUtil.cs (2)
795Process signTool = null; 799signTool = Process.Start(startInfo);
Microsoft.Build.Tasks.UnitTests (5)
Copy_Tests.cs (1)
1381engine.AssertLogContains(Process.GetCurrentProcess().Id.ToString()); // the file is locked by the current process
NativeMethodsShared_Tests.cs (1)
58Assert.Equal((uint)Process.GetCurrentProcess().Id, processId); // "Expected the .net processId to match the one from GetCurrentProcessId"
ProcessExtensions.cs (1)
12public static void KillTree(this Process process, int timeoutMilliseconds)
Unzip_Tests.cs (2)
168var process = Process.Start(psi);
Microsoft.Build.UnitTests.Shared (2)
RunnerUtilities.cs (1)
131using (var p = new Process { EnableRaisingEvents = true, StartInfo = psi })
TestEnvironment.cs (1)
681Process.GetProcessById(_processId).KillTree(1000);
Microsoft.Build.Utilities.Core (11)
ProcessExtensions.cs (1)
12public static void KillTree(this Process process, int timeoutMilliseconds)
ToolTask.cs (10)
357/// Overridable function called after <see cref="Process.Start()"/> in <see cref="ExecuteTool"/> 699/// <param name="proc">Fully populated <see cref="Process"/> instance representing the tool process to be started.</param> 700/// <returns>A started process. This could be <paramref name="proc"/> or another <see cref="Process"/> instance.</returns> 701protected virtual Process StartToolProcess(Process proc) 726Process proc = null; 878private void HandleToolNotifications(Process proc) 977private void KillToolProcessOnTimeout(Process proc, bool isBeingCancelled) 1021private void TerminateToolProcess(Process proc, bool isBeingCancelled) 1056private static void WaitForProcessExit(Process proc)
Microsoft.Build.Utilities.UnitTests (6)
NativeMethodsShared_Tests.cs (1)
58Assert.Equal((uint)Process.GetCurrentProcess().Id, processId); // "Expected the .net processId to match the one from GetCurrentProcessId"
ProcessExtensions_Tests.cs (2)
24Process p = Process.Start(psi); // sleep 10m.
ToolTask_Tests.cs (3)
742protected override Process StartToolProcess(Process proc) 745Process customProcess = new Process();
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
4790var currentProcess = Process.GetCurrentProcess();
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (7)
InteractiveSessionReferencesTests.cs (7)
49var s1 = s0.ContinueWithAsync($"#r \"{typeof(Process).Assembly.Location}\""); 60var newOptions = s0.Script.Options.AddReferences(typeof(Process).Assembly); 73#r ""{typeof(Process).Assembly.Location}"" 181typeof(Process).Assembly, 184var s0 = await CSharpScript.RunAsync<Process>($@" 228var process = CSharpScript.EvaluateAsync<Process>($@"
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Symbols\TypeResolutionTests.cs (3)
151var err = c.Assembly.GetTypeByReflectionType(typeof(C<Process, bool>.D.E<double, float>.F<byte>)); 154err = c.Assembly.GetTypeByReflectionType(typeof(C<int, bool>.D.E<double, Process>.F<byte>)); 157err = c.Assembly.GetTypeByReflectionType(typeof(Process[]));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Completion\GlobalAssemblyCacheCompletionHelperTests.cs (1)
28=> VerifyPresence("System,", typeof(System.Diagnostics.Process).Assembly.FullName);
Microsoft.CodeAnalysis.InteractiveHost (14)
Interactive\Core\InteractiveHost.cs (4)
92internal Process? TryGetProcess() 100internal event Action<Process>? InteractiveHostProcessCreated; 192private Task OnProcessExitedAsync(Process process) 198private void ReportProcessExited(Process process)
Interactive\Core\InteractiveHost.LazyRemoteService.cs (4)
135int currentProcessId = Process.GetCurrentProcess().Id; 138var newProcess = new Process 233private bool CheckAlive(Process process, string hostPath) 249private static int? TryGetExitCode(Process process)
Interactive\Core\InteractiveHost.RemoteService.cs (3)
24public readonly Process Process; 39internal RemoteService(InteractiveHost host, Process process, int processId, JsonRpc jsonRpc, InteractiveHostPlatformInfo platformInfo, InteractiveHostOptions options) 279internal static void InitiateTermination(Process process, int processId)
Interactive\Core\InteractiveHost.Service.cs (2)
194Process clientProcess; 197clientProcess = Process.GetProcessById(clientProcessId);
Interactive\Core\ProcessExtensions.cs (1)
11internal static bool IsAlive(this Process process)
Microsoft.CodeAnalysis.LanguageServer (9)
DotnetCliHelper.cs (4)
39using var process = Run(["--info"], workingDirectory: projectOutputDirectory, shouldLocalizeOutput: false); 72public Process Run(string[] arguments, string? workingDirectory, bool shouldLocalizeOutput, bool keepStandardInputOpen = false) 108var process = Process.Start(startInfo);
FileBasedPrograms\VirtualProjectXmlProvider.cs (1)
84var process = dotnetCliHelper.Run(["run-api"], workingDirectory, shouldLocalizeOutput: true, keepStandardInputOpen: true);
LanguageServer\Handler\Restore\RestoreHandler.cs (1)
73var process = dotnetCliHelper.Run(arguments, workingDirectory, shouldLocalizeOutput: true);
Logging\RoslynLogger.cs (2)
82var currentProcess = Process.GetCurrentProcess();
Testing\RunTestsHandler.cs (1)
132using var process = dotnetCliHelper.Run(["build", projectFileName], workingDirectory, shouldLocalizeOutput: true);
Microsoft.CodeAnalysis.LanguageServer.UnitTests (4)
Utilities\AbstractLanguageServerClientTests.TestLspClient.cs (4)
25private readonly Process _process; 46var process = Process.Start(processStartInfo); 126private TestLspClient(Process process, string pipeName, Dictionary<DocumentUri, SourceText> documents, Dictionary<string, IList<LSP.Location>> locations, ILoggerFactory loggerFactory)
Microsoft.CodeAnalysis.Remote.ServiceHub (5)
Host\ProcessExtensions.cs (1)
15public static bool TrySetPriorityClass(this Process process, ProcessPriorityClass priorityClass)
Services\BrokeredServiceBase.cs (1)
42Process.GetCurrentProcess().TrySetPriorityClass(ProcessPriorityClass.BelowNormal);
Services\Initialization\RemoteInitializationService.cs (1)
36return ValueTask.FromResult(Process.GetCurrentProcess().Id);
src\VisualStudio\Core\Def\Watson\FaultReporter.cs (2)
128var currentProcess = Process.GetCurrentProcess();
Microsoft.CodeAnalysis.Remote.Workspaces (4)
BrokeredServiceConnection.cs (2)
49private readonly Process? _remoteProcess; 60Process? remoteProcess)
ServiceHubRemoteHostClient.cs (2)
31private Process? _remoteProcess; 89client._remoteProcess = Process.GetProcessById(remoteProcessIdAndErrorMessage.Value.processId);
Microsoft.CodeAnalysis.Test.Utilities (5)
FX\ProcessUtilities.cs (5)
58using (var process = new Process { StartInfo = startInfo }) 97public static Process StartProcess(string fileName, string arguments, string workingDirectory = null) 115Process p = new Process { StartInfo = startInfo }; 139using (var process = System.Diagnostics.Process.Start(startInfo))
Microsoft.CodeAnalysis.VisualBasic (1)
CommandLine\VisualBasicCommandLineParser.vb (1)
458Dim processId = System.Diagnostics.Process.GetCurrentProcess().Id
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Host\PersistentStorage\IPersistentStorageConfiguration.cs (1)
52var fileName = Process.GetCurrentProcess().MainModule?.FileName;
Microsoft.CodeAnalysis.Workspaces.MSBuild (4)
MSBuild\BuildHostProcessManager.cs (4)
110var process = Process.Start(processStartInfo); 426private readonly Process _process; 437public BuildHostProcess(Process process, string pipeName, ILoggerFactory? loggerFactory)
Microsoft.Data.Analysis.Tests (2)
test\Microsoft.ML.TestFramework\BaseTestClass.cs (2)
81Process proc = Process.GetCurrentProcess();
Microsoft.DotNet.Arcade.Sdk (2)
src\InstallDotNetCore.cs (2)
146var process = Process.Start(new ProcessStartInfo()
Microsoft.DotNet.Arcade.Sdk.Tests (1)
Utilities\TestApp.cs (1)
87var process = new Process
Microsoft.DotNet.ArcadeAzureIntegration (2)
AzureCliCredentialWithAzNoUpdateWrapper.cs (2)
88using Process? process = Process.Start(processInfo);
Microsoft.DotNet.Build.Tasks.Feed (2)
src\common\GeneralUtils.cs (2)
255private static System.Threading.Tasks.Task WaitForProcessExitAsync(Process process) 277Process process = new Process
Microsoft.DotNet.Cli.Utils (11)
Command.cs (3)
10public class Command(Process? process, bool trimTrailingNewlines = false, IDictionary<string, string?>? customEnvironmentVariables = null) : ICommand 12private readonly Process _process = process ?? throw new ArgumentNullException(nameof(process)); 30public CommandResult Execute(Action<Process>? processStarted)
Extensions\ProcessExtensions.cs (4)
27public static Process? GetParentProcess(this Process process) 31return ppid != -1 ? Process.GetProcessById(ppid) : null; 39public static unsafe int GetParentProcessId(this Process process)
Extensions\ProcessStartInfoExtensions.cs (2)
17var process = new Process 40var process = new Process
ProcessReaper.cs (2)
28public ProcessReaper(Process process) 189private Process _process;
Microsoft.DotNet.Cli.Utils.Tests (3)
ProcessExtensionsTests.cs (3)
20int expectedParentProcessId = Process.GetCurrentProcess().Id; 22using Process childProcess = new(); 26Process parentProcess = childProcess.GetParentProcess();
Microsoft.DotNet.HotReload.Client.Package (2)
Web\BrowserRefreshServer.cs (2)
89using var process = Process.Start(dotnetPath, "dev-certs https --check --quiet");
Microsoft.DotNet.HotReload.Client.Tests (2)
BrowserRefreshServer.cs (2)
89using var process = Process.Start(dotnetPath, "dev-certs https --check --quiet");
Microsoft.DotNet.Internal.SymbolHelper (1)
SymbolUploadHelper.cs (1)
442using Process process = new()
Microsoft.DotNet.MacOsPkg.Core (1)
ExecuteHelper.cs (1)
23using (Process process = new Process { StartInfo = processStartInfo })
Microsoft.DotNet.MacOsPkg.Tests (2)
UnpackPackTests.cs (2)
216var process = Process.Start(new ProcessStartInfo()
Microsoft.DotNet.MSBuildSdkResolver (1)
EnvironmentProvider.cs (1)
129currentProcessPath = Process.GetCurrentProcess().MainModule.FileName;
Microsoft.DotNet.Open.Api.Tools.Tests (8)
ProcessEx.cs (4)
18private readonly Process _process; 25private ProcessEx(ITestOutputHelper output, Process proc) 77var proc = Process.Start(startInfo);
src\Shared\Process\ProcessExtensions.cs (4)
16public static void KillTree(this Process process) => process.KillTree(_defaultTimeout); 18public static void KillTree(this Process process, TimeSpan timeout) 106var process = Process.Start(startInfo);
Microsoft.DotNet.RemoteExecutor (9)
MiniDump.cs (1)
14public static void Create(Process process, string destinationPath)
RemoteExecutor.cs (2)
48string processFileName = Process.GetCurrentProcess().MainModule?.FileName; 477return new RemoteInvokeHandle(options.Start ? Process.Start(psi) : new Process() { StartInfo = psi },
RemoteInvokeHandle.cs (6)
21public RemoteInvokeHandle(Process process, RemoteInvokeOptions options, string assemblyName = null, string className = null, string methodName = null, IEnumerable<IDisposable> subDisposables = null) 40public Process Process { get; set; } 121foreach (Process p in Process.GetProcesses()) 129Process p = Process.Start(new ProcessStartInfo()
Microsoft.DotNet.SetupNugetSources.Tests (1)
ScriptRunner.cs (1)
63var process = new Process
Microsoft.DotNet.SignCheckLibrary (2)
Utils.cs (2)
183using (var process = Process.Start(psi))
Microsoft.DotNet.SignTool (13)
src\BatchSignUtil.cs (2)
444var process = Process.Start(processStartInfo);
src\RealSignTool.cs (1)
58using (var process = new Process())
src\SignTool.cs (4)
84var process = Process.Start(new ProcessStartInfo() 117var process = Process.Start(new ProcessStartInfo()
src\VerifySignatures.cs (2)
244using (var process = Process.Start(psi))
src\ZipData.cs (4)
328var process = Process.Start(new ProcessStartInfo() 802using Process process = Process.Start(psi);
Microsoft.DotNet.StrongName (4)
Signing.cs (2)
116var process = Process.Start(new ProcessStartInfo()
Verification.cs (2)
152var process = Process.Start(new ProcessStartInfo()
Microsoft.Extensions.AI.Evaluation.Console (1)
Commands\ReportCommand.cs (1)
106_ = Process.Start(
Microsoft.Extensions.AI.Templates.Tests (2)
Infrastructure\ProcessExtensions.cs (1)
8public static bool TryGetHasExited(this Process process)
Infrastructure\TestCommand.cs (1)
55using var process = new Process
Microsoft.Extensions.ApiDescription.Client.Tests (10)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
src\Shared\Process\ProcessEx.cs (5)
25private readonly Process _process; 36public ProcessEx(ITestOutputHelper output, Process proc, TimeSpan timeout) 69public Process Process => _process; 130var proc = Process.Start(startInfo);
src\Shared\Process\ProcessExtensions.cs (4)
16public static void KillTree(this Process process) => process.KillTree(_defaultTimeout); 18public static void KillTree(this Process process, TimeSpan timeout) 106var process = Process.Start(startInfo);
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (4)
Infrastructure\RedisTestConfig.cs (4)
20private static volatile Process _redisServerProcess; // null implies if server exists it was not started by this code 94var process = Process.GetProcessesByName(FunctionalTestsRedisServerExeName).SingleOrDefault(); 179_redisServerProcess = Process.Start(processInfo);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Windows\Interop\ProcessInfo.cs (2)
16foreach (var process in Process.GetProcesses())
Microsoft.Extensions.DotNetDeltaApplier.Tests (2)
BrowserRefreshServer.cs (2)
89using var process = Process.Start(dotnetPath, "dev-certs https --check --quiet");
Microsoft.Extensions.Hosting.WindowsServices (3)
Internal\Win32.cs (2)
14internal static unsafe Process? GetParentProcess() 36return Process.GetProcessById(procEntry.th32ParentProcessID);
WindowsServiceHelpers.cs (1)
41var parent = Internal.Win32.GetParentProcess();
Microsoft.Extensions.Telemetry.Tests (1)
Enrichment\ProcessLogEnricherTests.cs (1)
17private readonly int _processId = System.Diagnostics.Process.GetCurrentProcess().Id;
Microsoft.ML.AutoML (4)
AutoMLExperiment\IPerformanceMonitor.cs (4)
81_totalCpuProcessorTime = Process.GetCurrentProcess().TotalProcessorTime; 120using (var process = Process.GetCurrentProcess()) 122var currentCpuProcessorTime = Process.GetCurrentProcess().TotalProcessorTime;
Microsoft.ML.CodeGenerator (3)
Utils.cs (3)
195var proc = new System.Diagnostics.Process(); 221var proc = new System.Diagnostics.Process(); 242var proc = new System.Diagnostics.Process();
Microsoft.ML.Data (2)
Utilities\TimerScope.cs (2)
36long physicalMemoryUsageInMB = System.Diagnostics.Process.GetCurrentProcess().PeakWorkingSet64 / 1024 / 1024; 39long virtualMemoryUsageInMB = System.Diagnostics.Process.GetCurrentProcess().PeakVirtualMemorySize64 / 1024 / 1024;
Microsoft.ML.FastTree (3)
FastTree.cs (2)
452Process currentProcess = Process.GetCurrentProcess();
GamModelParameters.cs (1)
956System.Diagnostics.Process.Start(uri.AbsoluteUri + "content/GamViz/");
Microsoft.ML.Sweeper (1)
ConfigRunner.cs (1)
226var p = new System.Diagnostics.Process
Microsoft.ML.TestFramework (3)
BaseTestClass.cs (2)
81Process proc = Process.GetCurrentProcess();
CopyAction.cs (1)
47if (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "dotnet")
Microsoft.NET.Build.Containers (5)
LocalDaemons\DockerCli.cs (5)
112using Process? loadProcess = Process.Start(loadInfo) ?? 203Process proc = new() 667using var process = Process.Start(psi)!;
Microsoft.NET.Sdk.Publish.Tasks (2)
Tasks\GenerateEFSQLScripts.cs (2)
79private Process? _runningProcess; 97Process? proc = null;
Microsoft.NET.Sdk.Razor.Tasks (2)
ServerConnection.cs (2)
398var process = Process.Start(startInfo);
Microsoft.NET.Sdk.Razor.Tool.Tests (3)
ServerCommandTest.cs (1)
19var expectedProcessId = Process.GetCurrentProcess().Id;
ServerLifecycleTest.cs (2)
108Assert.Equal(Process.GetCurrentProcess().Id, serverProcessId); 192Assert.Equal(Process.GetCurrentProcess().Id, processId);
Microsoft.NET.TestFramework (2)
Commands\SdkCommandSpec.cs (1)
31var process = new Process()
Commands\TestCommand.cs (1)
27public Action<Process>? ProcessStartedHandler { get; set; }
Microsoft.TemplateEngine.Cli (5)
IReporterExtensions.cs (1)
28internal static void WriteCommandOutput(this IReporter reporter, Process process)
PostActionProcessors\ChmodPostActionProcessor.cs (2)
42Process? commandResult = System.Diagnostics.Process.Start(new ProcessStartInfo
PostActionProcessors\ProcessStartPostActionProcessor.cs (2)
53Process? commandResult = System.Diagnostics.Process.Start(new ProcessStartInfo
Microsoft.VisualBasic.IntegrationTests (14)
InteractionTests.cs (10)
13Process process = StartTestProcess("Interaction.MsgBox"); 36Process process = StartTestProcess("Interaction.InputBox"); 43Process process = StartTestProcess("Interaction.InputBox_VbHost"); 50Process process = StartTestProcess("VBInputBox.ShowDialog"); 59Process process = StartTestProcess("Interaction.MsgBox"); 75Process process = StartTestProcess("Interaction.MsgBox_VbHost"); 92Process process = Process.GetProcessById(processId); 114private static Process StartTestProcess(string arguments) 120private static void EndProcess(Process process)
Microsoft\VisualBasic\ApplicationServices\WindowsFormsApplicationBaseTests.cs (3)
16Process process = TestHelpers.StartProcess(startInfo); 25Process process0 = TestHelpers.StartProcess(new ProcessStartInfo { FileName = exePath, Arguments = "WindowsFormsApplicationBase.RunSingleInstance0" }); 26Process process1 = TestHelpers.StartProcess(new ProcessStartInfo { FileName = exePath, Arguments = "WindowsFormsApplicationBase.RunSingleInstance1" });
Microsoft\VisualBasic\MyServices\Internal\ProgressDialogTests.cs (1)
15Process process = TestHelpers.StartProcess(startInfo);
Microsoft.VisualStudio.LanguageServices (5)
EditAndContinue\EditAndContinueFeedbackDiagnosticFileProvider.cs (2)
57var vsProcess = Process.GetCurrentProcess();
Telemetry\VisualStudioWorkspaceTelemetryService.cs (1)
63(service, cancellationToken) => service.InitializeTelemetrySessionAsync(Process.GetCurrentProcess().Id, settings, logDelta, cancellationToken),
Watson\FaultReporter.cs (2)
128var currentProcess = Process.GetCurrentProcess();
Microsoft.VisualStudio.LanguageServices.DevKit (2)
Logging\VSCodeTelemetryLogger.cs (2)
146using var curProcess = Process.GetCurrentProcess();
MSBuild (6)
CommunicationsUtilities.cs (2)
217using var currentProcess = Process.GetCurrentProcess();
XMake.cs (4)
362using Process currentProcess = Process.GetCurrentProcess(); 2496using Process currentProcess = Process.GetCurrentProcess();
MSBuildTaskHost (12)
CommunicationsUtilities.cs (2)
217using var currentProcess = Process.GetCurrentProcess();
EnvironmentUtilities.cs (6)
40using Process currentProcess = Process.GetCurrentProcess(); 72using Process currentProcess = Process.GetCurrentProcess(); 90using Process currentProcess = Process.GetCurrentProcess();
NativeMethods.cs (4)
1313Process thisProcess; 1316thisProcess = Process.GetProcessById(processIdToKill); 1449foreach (Process possibleChildProcess in Process.GetProcesses())
netstandard (1)
netstandard.cs (1)
665[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Process))]
Pipelines.AppHost (8)
AppHost.cs (8)
74var getUserProcess = System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo 109var getSubscriptionProcess = System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo 144var getResourceGroupProcess = System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo 182var assignRoleProcess = System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo
Pipelines.Library (2)
DistributedApplicationPipelineExtensions.cs (2)
74var publishProcess = Process.Start(new ProcessStartInfo
PrepareTests (1)
TestDiscovery.cs (1)
76var worker = new Process();
PresentationUI (4)
InstallationError.xaml.cs (1)
211Process Notepad = new Process();
MS\Internal\Documents\RightsManagementProvider.cs (2)
1341System.Diagnostics.Process currentProcess = System.Diagnostics.Process.GetCurrentProcess();
TenFeetInstallationError.xaml.cs (1)
215Process Notepad = new Process();
Replay (4)
src\Compilers\Shared\BuildServerConnection.cs (3)
126var process = Process.GetProcessById(shutdownBuildResponse.ServerProcessId); 624if (Process.Start(startInfo) is { } process)
src\Compilers\Shared\CompilerServerLogger.cs (1)
126var processId = Process.GetCurrentProcess().Id;
Roslyn.Test.Performance.Utilities (1)
TestUtilities.cs (1)
132var process = new Process
RunTests (30)
ProcessRunner.cs (9)
17public Process Process { get; } 22public ProcessResult(Process process, int exitCode, ReadOnlyCollection<string> outputLines, ReadOnlyCollection<string> errorLines) 33public Process Process { get; } 39public ProcessInfo(Process process, ProcessStartInfo startInfo, Task<ProcessResult> result) 53Process.Start(file); 65Action<Process>? onProcessStartHandler = null, 78Action<Process>? onProcessStartHandler = null, 84var process = new Process(); 132static async ValueTask<int> GetExitCodeAsync(Process process)
ProcessUtil.cs (16)
15internal static int? TryGetParentProcessId(Process p) 43internal static List<Process> GetProcessChildren(Process process) => GetProcessChildrenCore(process, Process.GetProcesses()); 45private static List<Process> GetProcessChildrenCore(Process parentProcess, IEnumerable<Process> processes) 47var list = new List<Process>(); 48foreach (var process in processes) 68internal static List<Process> GetProcessTree(Process process) 70var processes = Process.GetProcesses(); 71var list = new List<Process>(); 72var toVisit = new Queue<Process>(); 77var cur = toVisit.Dequeue(); 79foreach (var child in children)
Program.cs (4)
175var process = processResult.Process; 222async Task DumpProcess(Process targetProcess, string procDumpExeFilePath, string dumpFilePath) 276foreach (var proc in ProcessUtil.GetProcessTree(Process.GetCurrentProcess()).OrderBy(x => x.ProcessName))
TestRunner.cs (1)
226Process.Start(startInfo);
rzc (4)
ServerProtocol\ServerConnection.cs (2)
398var process = Process.Start(startInfo);
ShutdownCommand.cs (2)
59var process = Process.GetProcessById(response.ServerProcessId);
SDDLTests (1)
Program.cs (1)
344Process p = new()
Stress.TelemetryService (4)
GaugeMetrics.cs (4)
15var process = Process.GetCurrentProcess(); 23var processes = Process.GetProcesses().ToList(); 25foreach (var process in processes)
Swaggatherer (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
System (1)
src\libraries\shims\System\ref\System.cs (1)
520[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Process))]
System.CodeDom (2)
System\CodeDom\Compiler\Executor.cs (2)
67using (Process p = Process.Start(psi))
System.Configuration.ConfigurationManager (2)
System\Configuration\ClientConfigPaths.cs (2)
75using (Process currentProcess = Process.GetCurrentProcess())
System.Diagnostics.Process (71)
System\Diagnostics\Process.cs (40)
90/// Initializes a new instance of the <see cref='System.Diagnostics.Process'/> class. 99if (GetType() == typeof(Process)) 551/// Gets or sets the properties to pass into the <see cref='System.Diagnostics.Process.Start(System.Diagnostics.ProcessStartInfo)'/> method for the <see cref='System.Diagnostics.Process'/>. 642/// Gets or sets whether the <see cref='System.Diagnostics.Process.Exited'/> 830/// Causes the <see cref="Process"/> component to wait the specified <paramref name="timeout"/> for the associated process to enter an idle state. 848/// No process is associated with this <see cref="Process"/> object. 1031/// Returns a new <see cref='System.Diagnostics.Process'/> component given a process identifier and 1035public static Process GetProcessById(int processId, string machineName) 1047/// Returns a new <see cref='System.Diagnostics.Process'/> component given the 1051public static Process GetProcessById(int processId) 1058/// Creates an array of <see cref='System.Diagnostics.Process'/> components that are 1067public static Process[] GetProcessesByName(string? processName) 1074/// Creates a new <see cref='System.Diagnostics.Process'/> 1081public static Process[] GetProcesses() 1088/// Creates a new <see cref='System.Diagnostics.Process'/> 1096public static Process[] GetProcesses(string machineName) 1100Process[] processes = new Process[processInfos.Length]; 1113/// Returns a new <see cref='System.Diagnostics.Process'/> 1117public static Process GetCurrentProcess() 1124/// Raises the <see cref='System.Diagnostics.Process.Exited'/> event. 1165/// that has been cached inside the process component. After <see cref='System.Diagnostics.Process.Refresh'/> is called, the 1232/// Starts a process specified by the <see cref='System.Diagnostics.Process.StartInfo'/> property of this <see cref='System.Diagnostics.Process'/> 1234/// <see cref='System.Diagnostics.Process'/> . If a process resource is reused 1235/// rather than started, the reused process is associated with this <see cref='System.Diagnostics.Process'/> 1290/// document or application file. Associates the process resource with a new <see cref='System.Diagnostics.Process'/> 1297public static Process Start(string fileName) 1309/// with a new <see cref='System.Diagnostics.Process'/> 1316public static Process Start(string fileName, string arguments) 1330public static Process Start(string fileName, IEnumerable<string> arguments) 1339/// Associates the process resource with a new <see cref='System.Diagnostics.Process'/> 1346public static Process? Start(ProcessStartInfo startInfo) 1350Process process = new Process(); 1418/// Instructs the <see cref='System.Diagnostics.Process'/> component to wait 1581/// Instructs the <see cref='System.Diagnostics.Process'/> component to start 1619/// Instructs the <see cref='System.Diagnostics.Process'/> component to start 1658/// Instructs the <see cref='System.Diagnostics.Process'/> component to cancel the asynchronous operation 1679/// Instructs the <see cref='System.Diagnostics.Process'/> component to cancel the asynchronous operation
System\Diagnostics\Process.Linux.cs (5)
19/// Creates an array of <see cref="Process"/> components that are associated with process resources on a 25public static Process[] GetProcessesByName(string? processName, string machineName) 31ArrayBuilder<Process> processes = default; 122/// It is the sum of the <see cref='System.Diagnostics.Process.UserProcessorTime'/> and 123/// <see cref='System.Diagnostics.Process.PrivilegedProcessorTime'/>.
System\Diagnostics\Process.NonUap.cs (11)
35private bool IsSelfOrDescendantOf(Process processOfInterest) 40Process[] allProcesses = GetProcesses(); 44var descendantProcesses = new Queue<Process>(); 45Process? current = this; 49foreach (Process candidate in current.GetChildProcesses(allProcesses)) 60foreach (Process process in allProcesses) 72private List<Process> GetChildProcesses(Process[]? processes = null) 77List<Process> childProcesses = new List<Process>(); 79foreach (Process possibleChildProcess in processes)
System\Diagnostics\Process.Unix.cs (6)
43public static Process Start(string fileName, string userName, SecureString password, string domain) 50public static Process Start(string fileName, string arguments, string userName, SecureString password, string domain) 124List<Process> children = GetChildProcesses(); 137foreach (Process childProcess in children) 307private bool IsParentOf(Process possibleChildProcess) 319private bool Equals(Process process)
System\Diagnostics\ProcessManager.Linux.cs (2)
52if (modules is not null && Process.GetExePath(procPid) is string exePath) 97ProcessName = processName ?? Process.GetUntruncatedProcessName(procPid, ref procFsStat) ?? string.Empty,
System\Diagnostics\ProcessStartInfo.cs (1)
16/// used in conjunction with the <see cref='System.Diagnostics.Process'/>
System\Diagnostics\ProcessThread.Linux.cs (5)
44return Process.TicksToTimeSpan(stat.stime); 48private DateTime GetStartTime() => Process.BootTimeToDateTime(Process.TicksToTimeSpan(GetStat().starttime)); 63return Process.TicksToTimeSpan(stat.utime + stat.stime); 79return Process.TicksToTimeSpan(stat.utime);
System\Diagnostics\ProcessWaitState.Unix.cs (1)
553Process.ConfigureTerminalForChildProcesses(-1, configureConsole);
System.Diagnostics.TextWriterTraceListener (2)
System\Diagnostics\XmlWriterTraceListener.cs (2)
259using Process process = Process.GetCurrentProcess();
System.Drawing.Common.Tests (2)
System\Drawing\GdiPlusHandlesTests.cs (2)
30using Process currentProcess = Process.GetCurrentProcess();
System.Net.Ping (3)
System\Net\NetworkInformation\Ping.PingUtility.cs (3)
18private Process GetPingProcess(IPAddress address, byte[] buffer, int timeout, PingOptions? options) 53using (Process p = GetPingProcess(address, buffer, timeout, options)) 78using Process pingProcess = GetPingProcess(address, buffer, timeout, options);
System.Windows.Forms (3)
System\Windows\Forms\Application.cs (3)
1303Process process = Process.GetCurrentProcess(); 1329Process.Start(currentStartInfo);
System.Windows.Forms.IntegrationTests.Common (25)
TestHelpers.cs (25)
77public static Process StartProcess(string path, bool setCwd = false) 105public static Process StartProcess(ProcessStartInfo startInfo) 111Process process = new(); 128public static int EndProcess(Process process, int timeout = Timeout.Infinite) 265/// <seealso cref="SendKeysToProcess(Process, string, bool)"/> 266public static bool SendEnterKeyToProcess(Process process, bool switchToMainWindow = true) 276/// <seealso cref="SendKeysToProcess(Process, string, bool)"/> 277public static bool SendTabKeyToProcess(Process process, bool switchToMainWindow = true) 287/// <seealso cref="SendKeysToProcess(Process, string, bool)"/> 288public static bool SendBackspaceKeyToProcess(Process process, bool switchToMainWindow = true) 298/// <seealso cref="SendKeysToProcess(Process, string, bool)"/> 299public static bool SendRightArrowKeyToProcess(Process process, bool switchToMainWindow = true) 309/// <seealso cref="SendKeysToProcess(Process, string, bool)"/> 310public static bool SendDownArrowKeyToProcess(Process process, bool switchToMainWindow = true) 320/// <seealso cref="SendKeysToProcess(Process, string, bool)"/> 321public static bool SendLeftArrowKeyToProcess(Process process, bool switchToMainWindow = true) 331/// <seealso cref="SendKeysToProcess(Process, string, bool)"/> 332public static bool SendUpArrowKeyToProcess(Process process, bool switchToMainWindow = true) 343/// <seealso cref="SendKeysToProcess(Process, string, bool)"/> 344public static bool SendAltKeyToProcess(Process process, char letter, bool switchToMainWindow = true) 355/// <seealso cref="SendKeysToProcess(Process, string, bool)"/> 356public static bool SendTabKeysToProcess(Process process, MainFormControlsTabOrder times, bool switchToMainWindow = true) 361public static bool SendTabKeysToProcess(Process process, int times, bool switchToMainWindow = true) 414/// <seealso cref="Process.MainWindowHandle"/> 419internal static bool SendKeysToProcess(Process process, string keys, bool switchToMainWindow = true)
System.Windows.Forms.Tests (1)
System\Windows\Forms\InputLanguageTests.cs (1)
214using Process process = new();
System.Windows.Forms.UI.IntegrationTests (8)
DragDropTests.cs (7)
167Process.Start("explorer.exe", $"/select,\"{dragAcceptRtfDestPath}\""); 550foreach (Process process in Process.GetProcesses()) 574foreach (Process process in Process.GetProcesses()) 620foreach (Process process in Process.GetProcesses())
ImageListTests.cs (1)
74(HANDLE)Process.GetCurrentProcess().Handle,
Templates.Blazor.Tests (32)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (12)
104using (var process = Process.Start(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)) 159using var checkTrustProcess = Process.Start(new ProcessStartInfo( 214using var process = Process.Start(processInfo); 257using (var process = Process.Start(processInfo)) 288using var findCertificateProcess = Process.Start(new ProcessStartInfo( 358using (var process = Process.Start(processInfo))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (10)
585using var process = Process.Start(startInfo)!; 614using var process = Process.Start(startInfo)!; 638using var process = Process.Start(startInfo)!; 810using var process = Process.Start(processInfo); 854using var process = Process.Start(processInfo);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
src\Shared\Process\ProcessEx.cs (5)
25private readonly Process _process; 36public ProcessEx(ITestOutputHelper output, Process proc, TimeSpan timeout) 69public Process Process => _process; 130var proc = Process.Start(startInfo);
src\Shared\Process\ProcessExtensions.cs (4)
16public static void KillTree(this Process process) => process.KillTree(_defaultTimeout); 18public static void KillTree(this Process process, TimeSpan timeout) 106var process = Process.Start(startInfo);
Templates.Blazor.WebAssembly.Auth.Tests (44)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (12)
104using (var process = Process.Start(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)) 159using var checkTrustProcess = Process.Start(new ProcessStartInfo( 214using var process = Process.Start(processInfo); 257using (var process = Process.Start(processInfo)) 288using var findCertificateProcess = Process.Start(new ProcessStartInfo( 358using (var process = Process.Start(processInfo))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (10)
585using var process = Process.Start(startInfo)!; 614using var process = Process.Start(startInfo)!; 638using var process = Process.Start(startInfo)!; 810using var process = Process.Start(processInfo); 854using var process = Process.Start(processInfo);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
src\Shared\E2ETesting\SauceConnectServer.cs (12)
27private Process _process; 29private Process _sentinelProcess; 50Process process, 52Process sentinelProcess) 106Process process = null; 107Process sentinel = null; 111process = Process.Start(psi); 191private static Process StartSentinelProcess(Process process, string sentinelFile, int timeout) 203return Process.Start(psi); 206private static void ProcessCleanup(Process process, string pidFilePath) 233private static async Task<string> WriteTrackingFileAsync(ITestOutputHelper output, string trackingFolder, Process process)
src\Shared\Process\ProcessEx.cs (5)
25private readonly Process _process; 36public ProcessEx(ITestOutputHelper output, Process proc, TimeSpan timeout) 69public Process Process => _process; 130var proc = Process.Start(startInfo);
src\Shared\Process\ProcessExtensions.cs (4)
16public static void KillTree(this Process process) => process.KillTree(_defaultTimeout); 18public static void KillTree(this Process process, TimeSpan timeout) 106var process = Process.Start(startInfo);
Templates.Blazor.WebAssembly.Tests (44)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (12)
104using (var process = Process.Start(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)) 159using var checkTrustProcess = Process.Start(new ProcessStartInfo( 214using var process = Process.Start(processInfo); 257using (var process = Process.Start(processInfo)) 288using var findCertificateProcess = Process.Start(new ProcessStartInfo( 358using (var process = Process.Start(processInfo))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (10)
585using var process = Process.Start(startInfo)!; 614using var process = Process.Start(startInfo)!; 638using var process = Process.Start(startInfo)!; 810using var process = Process.Start(processInfo); 854using var process = Process.Start(processInfo);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
src\Shared\E2ETesting\SauceConnectServer.cs (12)
27private Process _process; 29private Process _sentinelProcess; 50Process process, 52Process sentinelProcess) 106Process process = null; 107Process sentinel = null; 111process = Process.Start(psi); 191private static Process StartSentinelProcess(Process process, string sentinelFile, int timeout) 203return Process.Start(psi); 206private static void ProcessCleanup(Process process, string pidFilePath) 233private static async Task<string> WriteTrackingFileAsync(ITestOutputHelper output, string trackingFolder, Process process)
src\Shared\Process\ProcessEx.cs (5)
25private readonly Process _process; 36public ProcessEx(ITestOutputHelper output, Process proc, TimeSpan timeout) 69public Process Process => _process; 130var proc = Process.Start(startInfo);
src\Shared\Process\ProcessExtensions.cs (4)
16public static void KillTree(this Process process) => process.KillTree(_defaultTimeout); 18public static void KillTree(this Process process, TimeSpan timeout) 106var process = Process.Start(startInfo);
Templates.Mvc.Tests (44)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (12)
104using (var process = Process.Start(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)) 159using var checkTrustProcess = Process.Start(new ProcessStartInfo( 214using var process = Process.Start(processInfo); 257using (var process = Process.Start(processInfo)) 288using var findCertificateProcess = Process.Start(new ProcessStartInfo( 358using (var process = Process.Start(processInfo))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (10)
585using var process = Process.Start(startInfo)!; 614using var process = Process.Start(startInfo)!; 638using var process = Process.Start(startInfo)!; 810using var process = Process.Start(processInfo); 854using var process = Process.Start(processInfo);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
src\Shared\E2ETesting\SauceConnectServer.cs (12)
27private Process _process; 29private Process _sentinelProcess; 50Process process, 52Process sentinelProcess) 106Process process = null; 107Process sentinel = null; 111process = Process.Start(psi); 191private static Process StartSentinelProcess(Process process, string sentinelFile, int timeout) 203return Process.Start(psi); 206private static void ProcessCleanup(Process process, string pidFilePath) 233private static async Task<string> WriteTrackingFileAsync(ITestOutputHelper output, string trackingFolder, Process process)
src\Shared\Process\ProcessEx.cs (5)
25private readonly Process _process; 36public ProcessEx(ITestOutputHelper output, Process proc, TimeSpan timeout) 69public Process Process => _process; 130var proc = Process.Start(startInfo);
src\Shared\Process\ProcessExtensions.cs (4)
16public static void KillTree(this Process process) => process.KillTree(_defaultTimeout); 18public static void KillTree(this Process process, TimeSpan timeout) 106var process = Process.Start(startInfo);
Templates.Tests (44)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (12)
104using (var process = Process.Start(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)) 159using var checkTrustProcess = Process.Start(new ProcessStartInfo( 214using var process = Process.Start(processInfo); 257using (var process = Process.Start(processInfo)) 288using var findCertificateProcess = Process.Start(new ProcessStartInfo( 358using (var process = Process.Start(processInfo))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (10)
585using var process = Process.Start(startInfo)!; 614using var process = Process.Start(startInfo)!; 638using var process = Process.Start(startInfo)!; 810using var process = Process.Start(processInfo); 854using var process = Process.Start(processInfo);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
src\Shared\E2ETesting\SauceConnectServer.cs (12)
27private Process _process; 29private Process _sentinelProcess; 50Process process, 52Process sentinelProcess) 106Process process = null; 107Process sentinel = null; 111process = Process.Start(psi); 191private static Process StartSentinelProcess(Process process, string sentinelFile, int timeout) 203return Process.Start(psi); 206private static void ProcessCleanup(Process process, string pidFilePath) 233private static async Task<string> WriteTrackingFileAsync(ITestOutputHelper output, string trackingFolder, Process process)
src\Shared\Process\ProcessEx.cs (5)
25private readonly Process _process; 36public ProcessEx(ITestOutputHelper output, Process proc, TimeSpan timeout) 69public Process Process => _process; 130var proc = Process.Start(startInfo);
src\Shared\Process\ProcessExtensions.cs (4)
16public static void KillTree(this Process process) => process.KillTree(_defaultTimeout); 18public static void KillTree(this Process process, TimeSpan timeout) 106var process = Process.Start(startInfo);
UIAutomationClient (2)
MS\Internal\Automation\HwndProxyElementProvider.cs (2)
429System.Diagnostics.Process targetProcess = null; 432targetProcess = System.Diagnostics.Process.GetProcessById( pid );
UIAutomationClientSideProviders (4)
MS\Internal\AutomationProxies\Misc.cs (1)
1815string processName = System.Diagnostics.Process.GetProcessById((int)processId).ProcessName;
MS\Internal\AutomationProxies\WinEventTracker.cs (3)
475return Misc.ProxyGetClassName(Process.GetProcessById(processId).MainWindowHandle).Equals("ConsoleWindowClass"); 494Process[] localByName = Process.GetProcessesByName("csrss");
vbc (5)
src\Compilers\Shared\BuildServerConnection.cs (3)
126var process = Process.GetProcessById(shutdownBuildResponse.ServerProcessId); 624if (Process.Start(startInfo) is { } process)
src\Compilers\Shared\CompilerServerLogger.cs (1)
126var processId = Process.GetCurrentProcess().Id;
src\Compilers\VisualBasic\vbc\Program.cs (1)
33using var logger = new CompilerServerLogger($"vbc {Process.GetCurrentProcess().Id}");
VBCSCompiler (6)
src\Compilers\Server\VBCSCompiler\ClientConnectionHandler.cs (1)
70new ShutdownBuildResponse(Process.GetCurrentProcess().Id),
src\Compilers\Server\VBCSCompiler\VBCSCompiler.cs (1)
16using var logger = new CompilerServerLogger($"VBCSCompiler {Process.GetCurrentProcess().Id}");
src\Compilers\Shared\BuildServerConnection.cs (3)
126var process = Process.GetProcessById(shutdownBuildResponse.ServerProcessId); 624if (Process.Start(startInfo) is { } process)
src\Compilers\Shared\CompilerServerLogger.cs (1)
126var processId = Process.GetCurrentProcess().Id;
Wasm.Performance.ConsoleHost (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
WinFormsControlsTest (2)
DragDrop.cs (1)
397Process.Start(startInfo);
TaskDialogSamples.cs (1)
445Process.Start(psi)?.Dispose();