57 instantiations of Process
aspire (2)
DotNet\DotNetCliRunner.cs (1)
492var process = new Process { StartInfo = startInfo };
DotNet\DotNetSdkInstaller.cs (1)
47using var 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.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
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()
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.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.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.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
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();
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();
861 references to Process
aspire (7)
Backchannel\FailedToConnectBackchannelConnection.cs (2)
8internal sealed class FailedToConnectBackchannelConnection(string message, Process process, Exception innerException) : Exception(message, innerException) 10public Process Process => process;
DotNet\DotNetCliRunner.cs (4)
56var startTime = Process.GetCurrentProcess().StartTime; 492var process = new Process { StartInfo = startInfo }; 550async Task ForwardStreamToLoggerAsync(StreamReader reader, string identifier, Process process, Action<string>? lineCallback, CancellationToken cancellationToken) 572private async Task StartBackchannelAsync(Process? process, string socketPath, TaskCompletionSource<IAppHostBackchannel> backchannelCompletionSource, CancellationToken cancellationToken)
DotNet\DotNetSdkInstaller.cs (1)
47using var process = new Process
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\DashboardLifecycleHook.cs (1)
132var mainModule = Process.GetCurrentProcess().MainModule;
Dcp\Process\ProcessUtil.cs (3)
22var process = new System.Diagnostics.Process() 125private readonly System.Diagnostics.Process _process; 129public 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() 125private readonly System.Diagnostics.Process _process; 129public ProcessDisposable(System.Diagnostics.Process process, Task processLifetimeTask, bool entireProcessTree)
Aspire.Hosting.Python.Tests (4)
AddPythonAppTests.cs (4)
297var createVirtualEnvironmentProcess = Process.Start(prepareVirtualEnvironmentStartInfo); 327var 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)
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)
125var process = Process.GetProcessById(shutdownBuildResponse.ServerProcessId); 524if (Process.Start(startInfo) is { } process)
src\Compilers\Shared\CompilerServerLogger.cs (1)
126var processId = 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-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-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()
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.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.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)
125var process = Process.GetProcessById(shutdownBuildResponse.ServerProcessId); 524if (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)
125var process = Process.GetProcessById(shutdownBuildResponse.ServerProcessId); 524if (Process.Start(startInfo) is { } process)
src\Compilers\Shared\CompilerServerLogger.cs (1)
126var processId = Process.GetCurrentProcess().Id;
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)
34return 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); 436private readonly Process _process; 447public 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.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.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.SignCheckLibrary (2)
Utils.cs (2)
183using (var process = Process.Start(psi))
Microsoft.DotNet.SignTool (13)
src\BatchSignUtil.cs (2)
437var process = Process.Start(processStartInfo);
src\RealSignTool.cs (1)
58using (var process = new Process())
src\SignTool.cs (4)
78var process = Process.Start(new ProcessStartInfo() 111var process = Process.Start(new ProcessStartInfo()
src\VerifySignatures.cs (2)
244using (var process = Process.Start(psi))
src\ZipData.cs (4)
310var process = Process.Start(new ProcessStartInfo() 774using 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 (6)
Windows\Interop\ProcessInfo.cs (2)
16var processes = Process.GetProcesses(); 17foreach (var process in processes)
Windows\WindowsSnapshotProvider.cs (4)
108using var process = Process.GetCurrentProcess(); 122using var process = Process.GetCurrentProcess();
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 (1)
Enrichment\StaticProcessLogEnricher.cs (1)
27var pid = System.Diagnostics.Process.GetCurrentProcess().Id;
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.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();
netstandard (1)
netstandard.cs (1)
665[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Process))]
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)
125var process = Process.GetProcessById(shutdownBuildResponse.ServerProcessId); 524if (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);
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)
125var process = Process.GetProcessById(shutdownBuildResponse.ServerProcessId); 524if (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)
125var process = Process.GetProcessById(shutdownBuildResponse.ServerProcessId); 524if (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();