57 instantiations of Process
Aspire.EndToEnd.Tests (2)
tests\Shared\WorkloadTesting\AspireProject.cs (1)
157AppHostProcess = new Process();
tests\Shared\WorkloadTesting\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)
96using var process = new Process();
Aspire.Workload.Tests (2)
tests\Shared\WorkloadTesting\AspireProject.cs (1)
157AppHostProcess = new Process();
tests\Shared\WorkloadTesting\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)
197var 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)
548using Process process = new() 592using Process process = new()
Microsoft.Build.UnitTests.Shared (1)
RunnerUtilities.cs (1)
122using (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)
140var 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 (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.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)
77var pipeClient = new Process();
PresentationUI (2)
InstallationError.xaml.cs (1)
213Process Notepad = new Process();
TenFeetInstallationError.xaml.cs (1)
216Process 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)
204using Process process = new();
983 references to Process
Aspire.EndToEnd.Tests (5)
tests\Shared\WorkloadTesting\AspireProject.cs (1)
25public Process? AppHostProcess { get; private set; }
tests\Shared\WorkloadTesting\TestExtensions.cs (2)
21public static bool TryGetHasExited(this Process process) 33public static void CloseAndKillProcessIfRunning(this Process process)
tests\Shared\WorkloadTesting\ToolCommand.cs (2)
19public Process? CurrentProcess { get; private set; } 208private Process CreateProcess(string executable, string args)
Aspire.Hosting (3)
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)
281var createVirtualEnvironmentProcess = Process.Start(prepareVirtualEnvironmentStartInfo); 311var installRequirementsProcess = Process.Start(installRequirementsStartInfo);
Aspire.Hosting.Tests (3)
MSBuildTests.cs (1)
96using 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.Workload.Tests (5)
tests\Shared\WorkloadTesting\AspireProject.cs (1)
25public Process? AppHostProcess { get; private set; }
tests\Shared\WorkloadTesting\TestExtensions.cs (2)
21public static bool TryGetHasExited(this Process process) 33public static void CloseAndKillProcessIfRunning(this Process process)
tests\Shared\WorkloadTesting\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\Core\CommandLine\CompilerServerLogger.cs (1)
125var processId = Process.GetCurrentProcess().Id;
src\Compilers\CSharp\csc\Program.cs (1)
31using var logger = new CompilerServerLogger($"csc {Process.GetCurrentProcess().Id}");
src\Compilers\Shared\BuildServerConnection.cs (3)
122var process = Process.GetProcessById(shutdownBuildResponse.ServerProcessId); 520if (Process.Start(startInfo) is { } process)
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)
571using var process = Process.Start(startInfo)!; 600using var process = Process.Start(startInfo)!; 624using var process = Process.Start(startInfo)!; 796using var process = Process.Start(processInfo); 840using 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 (2)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
src\Tools\Shared\CommandLine\DebugHelper.cs (1)
26Console.WriteLine($"Process ID: {Process.GetCurrentProcess().Id}");
HelixTestRunner (5)
ProcessUtil.cs (5)
32var process = Process.GetCurrentProcess(); 47var process = Process.GetProcessById(pid); 84using var process = new Process()
IdeCoreBenchmarks (16)
ClassificationBenchmarks.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); 78Console.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)
54var restoreOperation = Process.Start("dotnet", $"restore /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1 /p:Deterministic=true /p:Optimize=true {_solutionPath}"); 68Console.WriteLine("Found Roslyn.sln: " + Process.GetCurrentProcess().Id); 83Console.WriteLine("Opening roslyn. Attach to: " + Process.GetCurrentProcess().Id);
NavigateToBenchmarks.cs (4)
51var restoreOperation = Process.Start("dotnet", $"restore /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1 /p:Deterministic=true /p:Optimize=true {_solutionPath}"); 65Console.WriteLine("Found Roslyn.sln: " + Process.GetCurrentProcess().Id); 80Console.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)
259await Host.ExecuteFileAsync(typeof(Process).Assembly.Location); 262Assert.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)
571using var process = Process.Start(startInfo)!; 600using var process = Process.Start(startInfo)!; 624using var process = Process.Start(startInfo)!; 796using var process = Process.Start(processInfo); 840using 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.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)
571using var process = Process.Start(startInfo)!; 600using var process = Process.Start(startInfo)!; 624using var process = Process.Start(startInfo)!; 796using var process = Process.Start(processInfo); 840using 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)
195private static (Process, ConcurrentQueue<string>) RunProcess(string fileName, string arguments, string prefix, ILogger logger) 197var 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 (58)
BackEnd\BuildManager\BuildManager.cs (6)
440private void UpdatePriority(Process p, ProcessPriorityClass priority) 463IEnumerable<Process>? processes = _nodeManager?.GetProcesses(); 466foreach (Process p in processes) 475foreach (Process p in processes) 762Process currentProcess = Process.GetCurrentProcess();
BackEnd\Client\MSBuildClient.cs (1)
477Process msbuildProcess = nodeLauncher.Start(_msbuildLocation, string.Join(" ", msBuildServerOptions), nodeId: 0);
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (1)
1429using (StreamWriter file = FileUtilities.OpenWrite(String.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, @"EngineTrace_{0}.txt"), Process.GetCurrentProcess().Id), append: true))
BackEnd\Components\Communications\CurrentHost.cs (2)
38using (Process currentProcess = Process.GetCurrentProcess())
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)
350public IEnumerable<Process> GetProcesses()
BackEnd\Components\Communications\NodeProviderInProc.cs (1)
468public IEnumerable<Process> GetProcesses() => throw new NotImplementedException();
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (1)
209public IEnumerable<Process> GetProcesses()
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (15)
149List<Process> nodeProcesses = GetPossibleRunningNodes().nodeProcesses.ToList(); 155nodeProcesses.AddRange(Process.GetProcessesByName(Path.GetFileNameWithoutExtension(msbuildtaskhostExeName))); 158foreach (Process nodeProcess in nodeProcesses) 223ConcurrentQueue<Process> possibleRunningNodes = null; 228IList<Process> possibleRunningNodesList; 230possibleRunningNodes = new ConcurrentQueue<Process>(possibleRunningNodesList); 265while (possibleRunningNodes != null && possibleRunningNodes.TryDequeue(out var nodeToReuse)) 268if (nodeToReuse.Id == Process.GetCurrentProcess().Id) 336Process msbuildProcess = nodeLauncher.Start(msbuildLocation, commandLineArgs, nodeId); 379void CreateNodeContext(int nodeId, Process nodeToReuse, Stream nodeStream) 395private (string expectedProcessName, IList<Process> nodeProcesses) GetPossibleRunningNodes(string msbuildLocation = null) 404var processes = Process.GetProcessesByName(expectedProcessName); 555private readonly Process _process; 557internal Process Process { get { return _process; } } 606public NodeContext(int nodeId, Process process,
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
610public IEnumerable<Process> GetProcesses()
BackEnd\Components\Communications\TaskHostNodeManager.cs (1)
173IEnumerable<Process> INodeManager.GetProcesses()
BackEnd\Components\Scheduler\Scheduler.cs (4)
2572using StreamWriter file = FileUtilities.OpenWrite(String.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerTrace_{0}.txt"), Process.GetCurrentProcess().Id), append: true); 2596using StreamWriter file = FileUtilities.OpenWrite(String.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), Process.GetCurrentProcess().Id), append: true); 2710using StreamWriter file = FileUtilities.OpenWrite(String.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), Process.GetCurrentProcess().Id), append: true); 2750using StreamWriter file = FileUtilities.OpenWrite(String.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), Process.GetCurrentProcess().Id), append: true);
BackEnd\Node\OutOfProcNode.cs (2)
850ProcessPriorityClass priorityClass = Process.GetCurrentProcess().PriorityClass; 863Process.GetCurrentProcess().PriorityClass = lowPriority ? ProcessPriorityClass.Normal : ProcessPriorityClass.BelowNormal;
BuildEnvironmentHelper.cs (1)
434return Process.GetCurrentProcess().MainModule.FileName;
CommunicationsUtilities.cs (2)
111sessionId = Process.GetCurrentProcess().SessionId; 839String.Format(CultureInfo.CurrentCulture, Path.Combine(s_debugDumpPath, fileName), Process.GetCurrentProcess().Id, nodeId), append: true))
DebugUtils.cs (3)
95Process.GetCurrentProcess().ProcessName.Contains(processNameToBreakInto); 101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
Evaluation\ProjectRootElementCache.cs (1)
677Trace.WriteLine(prefix + " " + Process.GetCurrentProcess().Id + " | " + message + param1);
ExceptionHandling.cs (1)
355var pid = Process.GetCurrentProcess().Id;
FileUtilities.cs (2)
131cacheDirectory = Path.Combine(TempFileDirectory, String.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", Process.GetCurrentProcess().Id, AppDomain.CurrentDomain.Id)); 185File.WriteAllText(testFilePath, $"MSBuild process {Process.GetCurrentProcess().Id} successfully wrote to file.");
NamedPipeUtil.cs (1)
15processId = Process.GetCurrentProcess().Id;
ProcessExtensions.cs (1)
12public static void KillTree(this Process process, int timeoutMilliseconds)
Microsoft.Build.CommandLine.UnitTests (8)
MSBuildServer_Tests.cs (4)
55Pid = Process.GetCurrentProcess().Id; 118Process.GetProcessById(pidOfServerProcess).KillTree(1000); 249var serverProcess = Process.GetProcessById(pidOfServerProcess);
ProcessExtensions.cs (1)
12public static void KillTree(this Process process, int timeoutMilliseconds)
XMake_Tests.cs (3)
548using Process process = new() 592using Process process = new() 1545ProcessPriorityClass currentPriority = Process.GetCurrentProcess().PriorityClass;
Microsoft.Build.Engine.OM.UnitTests (8)
BuildEnvironmentHelper.cs (1)
434return Process.GetCurrentProcess().MainModule.FileName;
DebugUtils.cs (3)
95Process.GetCurrentProcess().ProcessName.Contains(processNameToBreakInto); 101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
ExceptionHandling.cs (1)
355var pid = Process.GetCurrentProcess().Id;
FileUtilities.cs (2)
131cacheDirectory = Path.Combine(TempFileDirectory, String.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", Process.GetCurrentProcess().Id, AppDomain.CurrentDomain.Id)); 185File.WriteAllText(testFilePath, $"MSBuild process {Process.GetCurrentProcess().Id} successfully wrote to file.");
ProcessExtensions.cs (1)
12public static void KillTree(this Process process, int timeoutMilliseconds)
Microsoft.Build.Engine.UnitTests (14)
BackEnd\BuildManager_Tests.cs (8)
347int numberProcsOriginally = (new List<Process>(Process.GetProcessesByName("MSBuild"))).Count; 351string shutdownProjectDirectory = Path.Combine(Path.GetTempPath(), String.Format(CultureInfo.InvariantCulture, "VSNodeShutdown_{0}_UnitTest", Process.GetCurrentProcess().Id)); 378int numberProcsAfterBuild = (new List<Process>(Process.GetProcessesByName("MSBuild"))).Count; 389int numberProcsAfterShutdown = (new List<Process>(Process.GetProcessesByName("MSBuild"))).Count; 455Assert.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\SdkResultOutOfProc_Tests.cs (1)
192processId.ShouldNotBe(Process.GetCurrentProcess().Id);
BackEnd\TaskHostFactory_Tests.cs (3)
50Process.GetCurrentProcess().Id.ShouldNotBe<int>(pid); 53Process taskHostNode = Process.GetProcessById(pid);
Evaluation\Expander_Tests.cs (1)
2630Assert.Equal(System.Diagnostics.Process.GetCurrentProcess().Id, pid);
Microsoft.Build.Framework (6)
FileClassifier.cs (1)
144string processName = Process.GetCurrentProcess().MainModule.FileName;
NativeMethods.cs (4)
1314Process thisProcess; 1317thisProcess = Process.GetProcessById(processIdToKill); 1450foreach (Process possibleChildProcess in Process.GetProcesses())
Profiler\EvaluationIdProvider.cs (1)
17private static readonly long ProcessId = Process.GetCurrentProcess().Id;
Microsoft.Build.Framework.UnitTests (1)
ProcessExtensions.cs (1)
12public static void KillTree(this Process process, int timeoutMilliseconds)
Microsoft.Build.Tasks.CodeAnalysis (5)
ManagedCompiler.cs (1)
502using var logger = new CompilerServerLogger($"MSBuild {Process.GetCurrentProcess().Id}");
src\Compilers\Core\CommandLine\CompilerServerLogger.cs (1)
125var processId = Process.GetCurrentProcess().Id;
src\Compilers\Shared\BuildServerConnection.cs (3)
122var process = Process.GetProcessById(shutdownBuildResponse.ServerProcessId); 520if (Process.Start(startInfo) is { } process)
Microsoft.Build.Tasks.Core (10)
BuildEnvironmentHelper.cs (1)
434return Process.GetCurrentProcess().MainModule.FileName;
DebugUtils.cs (3)
95Process.GetCurrentProcess().ProcessName.Contains(processNameToBreakInto); 101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
ExceptionHandling.cs (1)
355var pid = Process.GetCurrentProcess().Id;
FileUtilities.cs (2)
131cacheDirectory = Path.Combine(TempFileDirectory, String.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", Process.GetCurrentProcess().Id, AppDomain.CurrentDomain.Id)); 185File.WriteAllText(testFilePath, $"MSBuild process {Process.GetCurrentProcess().Id} successfully wrote to file.");
ManifestUtil\SecurityUtil.cs (2)
794Process signTool = null; 798signTool = Process.Start(startInfo);
RoslynCodeTaskFactory\RoslynCodeTaskFactoryCompilers.cs (1)
55_dotnetCliPath = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
Microsoft.Build.Tasks.UnitTests (5)
Copy_Tests.cs (1)
1386engine.AssertLogContains(Process.GetCurrentProcess().Id.ToString()); // the file is locked by the current process
NativeMethodsShared_Tests.cs (1)
59Assert.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)
170var process = Process.Start(psi);
Microsoft.Build.UnitTests.Shared (2)
RunnerUtilities.cs (1)
122using (var p = new Process { EnableRaisingEvents = true, StartInfo = psi })
TestEnvironment.cs (1)
638Process.GetProcessById(_processId).KillTree(1000);
Microsoft.Build.Utilities.Core (18)
BuildEnvironmentHelper.cs (1)
434return Process.GetCurrentProcess().MainModule.FileName;
DebugUtils.cs (3)
95Process.GetCurrentProcess().ProcessName.Contains(processNameToBreakInto); 101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
ExceptionHandling.cs (1)
355var pid = Process.GetCurrentProcess().Id;
FileUtilities.cs (2)
131cacheDirectory = Path.Combine(TempFileDirectory, String.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", Process.GetCurrentProcess().Id, AppDomain.CurrentDomain.Id)); 185File.WriteAllText(testFilePath, $"MSBuild process {Process.GetCurrentProcess().Id} successfully wrote to file.");
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; 876private void HandleToolNotifications(Process proc) 975private void KillToolProcessOnTimeout(Process proc, bool isBeingCancelled) 1019private void TerminateToolProcess(Process proc, bool isBeingCancelled) 1054private static void WaitForProcessExit(Process proc)
Microsoft.Build.Utilities.UnitTests (6)
NativeMethodsShared_Tests.cs (1)
59Assert.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)
51var s1 = s0.ContinueWithAsync($"#r \"{typeof(Process).Assembly.Location}\""); 62var newOptions = s0.Script.Options.AddReferences(typeof(Process).Assembly); 75#r ""{typeof(Process).Assembly.Location}"" 183typeof(Process).Assembly, 186var s0 = await CSharpScript.RunAsync<Process>($@" 230var 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)
33VerifyPresence(code, typeof(System.Diagnostics.Process).Assembly.FullName);
Microsoft.CodeAnalysis.InteractiveHost (14)
Interactive\Core\InteractiveHost.cs (4)
93internal Process? TryGetProcess() 101internal event Action<Process>? InteractiveHostProcessCreated; 193private Task OnProcessExitedAsync(Process process) 199private void ReportProcessExited(Process process)
Interactive\Core\InteractiveHost.LazyRemoteService.cs (4)
137int currentProcessId = Process.GetCurrentProcess().Id; 140var newProcess = new Process 235private bool CheckAlive(Process process, string hostPath) 251private 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)
192Process clientProcess; 195clientProcess = Process.GetProcessById(clientProcessId);
Interactive\Core\ProcessExtensions.cs (1)
11internal static bool IsAlive(this Process process)
Microsoft.CodeAnalysis.LanguageServer (5)
DotnetCliHelper.cs (3)
71public Process Run(string[] arguments, string? workingDirectory, bool shouldLocalizeOutput) 106var process = Process.Start(startInfo);
Logging\RoslynLogger.cs (2)
83var currentProcess = Process.GetCurrentProcess();
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\ProcessTelemetry\RemoteProcessTelemetryService.cs (1)
116return ValueTaskFactory.FromResult(Process.GetCurrentProcess().Id);
src\VisualStudio\Core\Def\Watson\FaultReporter.cs (2)
128var currentProcess = Process.GetCurrentProcess();
Microsoft.CodeAnalysis.Remote.Workspaces (4)
BrokeredServiceConnection.cs (2)
50private readonly Process? _remoteProcess; 61Process? remoteProcess)
ServiceHubRemoteHostClient.cs (2)
31private Process? _remoteProcess; 83client._remoteProcess = Process.GetProcessById(remoteProcessId.Value);
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.Workspaces (1)
Workspace\Host\PersistentStorage\IPersistentStorageConfiguration.cs (1)
53var fileName = Process.GetCurrentProcess().MainModule?.FileName;
Microsoft.CodeAnalysis.Workspaces.MSBuild (4)
MSBuild\BuildHostProcessManager.cs (4)
90var process = Process.Start(processStartInfo); 364private readonly Process _process; 375public 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 (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.SignTool (10)
src\BatchSignUtil.cs (2)
439var process = Process.Start(processStartInfo);
src\RealSignTool.cs (4)
63var process = Process.Start(new ProcessStartInfo() 117var process = Process.Start(new ProcessStartInfo()
src\SignTool.cs (2)
199var process = Process.Start(new ProcessStartInfo()
src\VerifySignatures.cs (2)
203using (var process = Process.Start(psi))
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)
93using var process = Process.GetCurrentProcess(); 104using 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.Tests (1)
Enrichment\ProcessLogEnricherTests.cs (1)
17private readonly int _processId = System.Diagnostics.Process.GetCurrentProcess().Id;
Microsoft.Maui.Essentials (1)
AppInfo\AppInfo.uwp.cs (1)
58 Process.Start(new ProcessStartInfo { FileName = SettingsUri, UseShellExecute = true });
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();
MSBuild (23)
BuildEnvironmentHelper.cs (1)
434return Process.GetCurrentProcess().MainModule.FileName;
CommunicationsUtilities.cs (2)
111sessionId = Process.GetCurrentProcess().SessionId; 839String.Format(CultureInfo.CurrentCulture, Path.Combine(s_debugDumpPath, fileName), Process.GetCurrentProcess().Id, nodeId), append: true))
DebugUtils.cs (3)
95Process.GetCurrentProcess().ProcessName.Contains(processNameToBreakInto); 101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
ExceptionHandling.cs (1)
355var pid = Process.GetCurrentProcess().Id;
FileUtilities.cs (2)
131cacheDirectory = Path.Combine(TempFileDirectory, String.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", Process.GetCurrentProcess().Id, AppDomain.CurrentDomain.Id)); 185File.WriteAllText(testFilePath, $"MSBuild process {Process.GetCurrentProcess().Id} successfully wrote to file.");
MSBuildClientApp.cs (2)
116using (Process currentProcess = Process.GetCurrentProcess())
NamedPipeUtil.cs (1)
15processId = Process.GetCurrentProcess().Id;
OutOfProcTaskHostNode.cs (1)
814? File.CreateText(string.Format(CultureInfo.CurrentCulture, Path.Combine(FileUtilities.TempFileDirectory, @"MSBuild_NodeShutdown_{0}.txt"), Process.GetCurrentProcess().Id))
PerformanceLogEventListener.cs (1)
82_processIDStr = Process.GetCurrentProcess().Id.ToString();
XMake.cs (9)
434Process currentProcess = Process.GetCurrentProcess(); 630Process currentProcess = Process.GetCurrentProcess(); 1739Process.GetCurrentProcess().MainModule?.FileName ?? string.Empty), 2530Process currentProcess = Process.GetCurrentProcess(); 2558if (lowPriority && Process.GetCurrentProcess().PriorityClass != ProcessPriorityClass.Idle) 2560Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.BelowNormal;
MSBuildTaskHost (14)
BuildEnvironmentHelper.cs (1)
439return Process.GetCurrentProcess().MainModule.FileName;
CommunicationsUtilities.cs (2)
111sessionId = Process.GetCurrentProcess().SessionId; 839String.Format(CultureInfo.CurrentCulture, Path.Combine(s_debugDumpPath, fileName), Process.GetCurrentProcess().Id, nodeId), append: true))
ExceptionHandling.cs (1)
355var pid = Process.GetCurrentProcess().Id;
FileUtilities.cs (2)
131cacheDirectory = Path.Combine(TempFileDirectory, String.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", Process.GetCurrentProcess().Id, AppDomain.CurrentDomain.Id)); 185File.WriteAllText(testFilePath, $"MSBuild process {Process.GetCurrentProcess().Id} successfully wrote to file.");
NamedPipeUtil.cs (1)
15processId = Process.GetCurrentProcess().Id;
NativeMethods.cs (4)
1314Process thisProcess; 1317thisProcess = Process.GetProcessById(processIdToKill); 1450foreach (Process possibleChildProcess in Process.GetProcesses())
OutOfProcTaskHost.cs (2)
93Process currentProcess = Process.GetCurrentProcess();
OutOfProcTaskHostNode.cs (1)
814? File.CreateText(string.Format(CultureInfo.CurrentCulture, Path.Combine(FileUtilities.TempFileDirectory, @"MSBuild_NodeShutdown_{0}.txt"), Process.GetCurrentProcess().Id))
netstandard (1)
netstandard.cs (1)
665[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Process))]
PrepareTests (1)
TestDiscovery.cs (1)
77var pipeClient = new Process();
PresentationUI (4)
InstallationError.xaml.cs (1)
213Process Notepad = new Process();
MS\Internal\Documents\RightsManagementProvider.cs (2)
1344System.Diagnostics.Process currentProcess = System.Diagnostics.Process.GetCurrentProcess();
TenFeetInstallationError.xaml.cs (1)
216Process Notepad = new Process();
Replay (4)
src\Compilers\Core\CommandLine\CompilerServerLogger.cs (1)
125var processId = Process.GetCurrentProcess().Id;
src\Compilers\Shared\BuildServerConnection.cs (3)
122var process = Process.GetProcessById(shutdownBuildResponse.ServerProcessId); 520if (Process.Start(startInfo) is { } process)
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)
18internal static int? TryGetParentProcessId(Process p) 46internal static List<Process> GetProcessChildren(Process process) => GetProcessChildrenCore(process, Process.GetProcesses()); 48private static List<Process> GetProcessChildrenCore(Process parentProcess, IEnumerable<Process> processes) 50var list = new List<Process>(); 51foreach (var process in processes) 71internal static List<Process> GetProcessTree(Process process) 73var processes = Process.GetProcesses(); 74var list = new List<Process>(); 75var toVisit = new Queue<Process>(); 80var cur = toVisit.Dequeue(); 82foreach (var child in children)
Program.cs (4)
170var process = processResult.Process; 217async Task DumpProcess(Process targetProcess, string procDumpExeFilePath, string dumpFilePath) 271foreach (var proc in ProcessUtil.GetProcessTree(Process.GetCurrentProcess()).OrderBy(x => x.ProcessName))
TestRunner.cs (1)
476Process.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)
1272Process process = Process.GetCurrentProcess(); 1298Process.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)
204using Process process = new();
System.Windows.Forms.UI.IntegrationTests (8)
DragDropTests.cs (7)
168Process.Start("explorer.exe", $"/select,\"{dragAcceptRtfDestPath}\""); 551foreach (Process process in Process.GetProcesses()) 575foreach (Process process in Process.GetProcesses()) 621foreach (Process process in Process.GetProcesses())
ImageListTests.cs (1)
75(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)
571using var process = Process.Start(startInfo)!; 600using var process = Process.Start(startInfo)!; 624using var process = Process.Start(startInfo)!; 796using var process = Process.Start(processInfo); 840using 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)
571using var process = Process.Start(startInfo)!; 600using var process = Process.Start(startInfo)!; 624using var process = Process.Start(startInfo)!; 796using var process = Process.Start(processInfo); 840using 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)
571using var process = Process.Start(startInfo)!; 600using var process = Process.Start(startInfo)!; 624using var process = Process.Start(startInfo)!; 796using var process = Process.Start(processInfo); 840using 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)
571using var process = Process.Start(startInfo)!; 600using var process = Process.Start(startInfo)!; 624using var process = Process.Start(startInfo)!; 796using var process = Process.Start(processInfo); 840using 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)
571using var process = Process.Start(startInfo)!; 600using var process = Process.Start(startInfo)!; 624using var process = Process.Start(startInfo)!; 796using var process = Process.Start(processInfo); 840using 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)
440System.Diagnostics.Process targetProcess = null; 443targetProcess = System.Diagnostics.Process.GetProcessById( pid );
UIAutomationClientSideProviders (4)
MS\Internal\AutomationProxies\Misc.cs (1)
1836string processName = System.Diagnostics.Process.GetProcessById((int)processId).ProcessName;
MS\Internal\AutomationProxies\WinEventTracker.cs (3)
486return Misc.ProxyGetClassName(Process.GetProcessById(processId).MainWindowHandle).Equals("ConsoleWindowClass"); 505Process[] localByName = Process.GetProcessesByName("csrss");
vbc (5)
src\Compilers\Core\CommandLine\CompilerServerLogger.cs (1)
125var processId = Process.GetCurrentProcess().Id;
src\Compilers\Shared\BuildServerConnection.cs (3)
122var process = Process.GetProcessById(shutdownBuildResponse.ServerProcessId); 520if (Process.Start(startInfo) is { } process)
src\Compilers\VisualBasic\vbc\Program.cs (1)
33using var logger = new CompilerServerLogger($"vbc {Process.GetCurrentProcess().Id}");
VBCSCompiler (5)
src\Compilers\Core\CommandLine\CompilerServerLogger.cs (1)
125var processId = Process.GetCurrentProcess().Id;
src\Compilers\Server\VBCSCompiler\ClientConnectionHandler.cs (1)
70new ShutdownBuildResponse(Process.GetCurrentProcess().Id),
src\Compilers\Shared\BuildServerConnection.cs (3)
122var process = Process.GetProcessById(shutdownBuildResponse.ServerProcessId); 520if (Process.Start(startInfo) is { } process)
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();