100 references to GetCurrentProcess
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 (2)
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}");
dotnet-dev-certs (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
dotnet-getdocument (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
dotnet-openapi (1)
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 (4)
Shared\Utilities\DebugUtils.cs (1)
42var process = Process.GetCurrentProcess();
Shared\Utilities\ProcessRunner.cs (1)
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 (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
dotnet-user-secrets (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
ExceptionHandlerSample (1)
StartupWithWebSocket.cs (1)
38await context.Response.WriteAsync($"Not a web socket request. PID: {Process.GetCurrentProcess().Id}");
GetDocument.Insider (1)
src\Tools\Shared\CommandLine\DebugHelper.cs (1)
26Console.WriteLine($"Process ID: {Process.GetCurrentProcess().Id}");
HelixTestRunner (1)
ProcessUtil.cs (1)
32var process = Process.GetCurrentProcess();
IdeCoreBenchmarks (8)
ClassificationBenchmarks.cs (2)
62Console.WriteLine("Found Roslyn.sln: " + Process.GetCurrentProcess().Id); 78Console.WriteLine("Opening roslyn. Attach to: " + Process.GetCurrentProcess().Id);
FindReferencesBenchmarks.cs (2)
59Console.WriteLine("Found Compilers.slnf: " + Process.GetCurrentProcess().Id); 75Console.WriteLine("Opening roslyn. Attach to: " + Process.GetCurrentProcess().Id);
IncrementalSourceGeneratorBenchmarks.cs (2)
68Console.WriteLine("Found Roslyn.sln: " + Process.GetCurrentProcess().Id); 83Console.WriteLine("Opening roslyn. Attach to: " + Process.GetCurrentProcess().Id);
NavigateToBenchmarks.cs (2)
65Console.WriteLine("Found Roslyn.sln: " + Process.GetCurrentProcess().Id); 80Console.WriteLine("Opening roslyn. Attach to: " + Process.GetCurrentProcess().Id);
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
Microsoft.AspNetCore.InternalTesting (1)
CollectDumpAttribute.cs (1)
31var process = Process.GetCurrentProcess();
Microsoft.AspNetCore.OpenApi.Build.Tests (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
Microsoft.Build (2)
BackEnd\Node\OutOfProcNode.cs (1)
850using Process currentProcess = Process.GetCurrentProcess();
CommunicationsUtilities.cs (1)
111using Process currentProcess = Process.GetCurrentProcess();
Microsoft.Build.CommandLine.UnitTests (2)
MSBuildServer_Tests.cs (1)
55Pid = Process.GetCurrentProcess().Id;
XMake_Tests.cs (1)
1545ProcessPriorityClass currentPriority = Process.GetCurrentProcess().PriorityClass;
Microsoft.Build.Engine.UnitTests (6)
BackEnd\BuildManager_Tests.cs (2)
351string shutdownProjectDirectory = Path.Combine(Path.GetTempPath(), String.Format(CultureInfo.InvariantCulture, "VSNodeShutdown_{0}_UnitTest", Process.GetCurrentProcess().Id)); 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 (1)
50Process.GetCurrentProcess().Id.ShouldNotBe<int>(pid);
Evaluation\Expander_Tests.cs (1)
2630Assert.Equal(System.Diagnostics.Process.GetCurrentProcess().Id, pid);
Microsoft.Build.Framework (3)
EnvironmentUtilities.cs (3)
40using Process currentProcess = Process.GetCurrentProcess(); 72using Process currentProcess = Process.GetCurrentProcess(); 90using Process currentProcess = Process.GetCurrentProcess();
Microsoft.Build.Tasks.CodeAnalysis (2)
ManagedCompiler.cs (1)
502using var logger = new CompilerServerLogger($"MSBuild {Process.GetCurrentProcess().Id}");
src\Compilers\Core\CommandLine\CompilerServerLogger.cs (1)
125var processId = Process.GetCurrentProcess().Id;
Microsoft.Build.Tasks.UnitTests (2)
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"
Microsoft.Build.Utilities.UnitTests (1)
NativeMethodsShared_Tests.cs (1)
59Assert.Equal((uint)Process.GetCurrentProcess().Id, processId); // "Expected the .net processId to match the one from GetCurrentProcessId"
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
4790var currentProcess = Process.GetCurrentProcess();
Microsoft.CodeAnalysis.InteractiveHost (1)
Interactive\Core\InteractiveHost.LazyRemoteService.cs (1)
137int currentProcessId = Process.GetCurrentProcess().Id;
Microsoft.CodeAnalysis.LanguageServer (1)
Logging\RoslynLogger.cs (1)
83var currentProcess = Process.GetCurrentProcess();
Microsoft.CodeAnalysis.Remote.ServiceHub (3)
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 (1)
128var currentProcess = Process.GetCurrentProcess();
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Host\PersistentStorage\IPersistentStorageConfiguration.cs (1)
53var fileName = Process.GetCurrentProcess().MainModule?.FileName;
Microsoft.Data.Analysis.Tests (1)
test\Microsoft.ML.TestFramework\BaseTestClass.cs (1)
81Process proc = Process.GetCurrentProcess();
Microsoft.DotNet.RemoteExecutor (1)
RemoteExecutor.cs (1)
48string processFileName = Process.GetCurrentProcess().MainModule?.FileName;
Microsoft.Extensions.ApiDescription.Client.Tests (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Windows\WindowsSnapshotProvider.cs (2)
98using var process = Process.GetCurrentProcess(); 108using var process = Process.GetCurrentProcess();
Microsoft.Extensions.Telemetry.Tests (1)
Enrichment\ProcessLogEnricherTests.cs (1)
17private readonly int _processId = System.Diagnostics.Process.GetCurrentProcess().Id;
Microsoft.ML.AutoML (3)
AutoMLExperiment\IPerformanceMonitor.cs (3)
81_totalCpuProcessorTime = Process.GetCurrentProcess().TotalProcessorTime; 120using (var process = Process.GetCurrentProcess()) 122var currentCpuProcessorTime = Process.GetCurrentProcess().TotalProcessorTime;
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 (1)
FastTree.cs (1)
452Process currentProcess = Process.GetCurrentProcess();
Microsoft.ML.TestFramework (2)
BaseTestClass.cs (1)
81Process proc = Process.GetCurrentProcess();
CopyAction.cs (1)
47if (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "dotnet")
Microsoft.VisualStudio.LanguageServices (3)
EditAndContinue\EditAndContinueFeedbackDiagnosticFileProvider.cs (1)
57var vsProcess = Process.GetCurrentProcess();
Telemetry\VisualStudioWorkspaceTelemetryService.cs (1)
62(service, cancellationToken) => service.InitializeTelemetrySessionAsync(Process.GetCurrentProcess().Id, settings, logDelta, cancellationToken),
Watson\FaultReporter.cs (1)
128var currentProcess = Process.GetCurrentProcess();
Microsoft.VisualStudio.LanguageServices.DevKit (1)
Logging\VSCodeTelemetryLogger.cs (1)
146using var curProcess = Process.GetCurrentProcess();
MSBuild (3)
CommunicationsUtilities.cs (1)
111using Process currentProcess = Process.GetCurrentProcess();
XMake.cs (2)
437using Process currentProcess = Process.GetCurrentProcess(); 2568using Process currentProcess = Process.GetCurrentProcess();
MSBuildTaskHost (4)
CommunicationsUtilities.cs (1)
111using Process currentProcess = Process.GetCurrentProcess();
EnvironmentUtilities.cs (3)
40using Process currentProcess = Process.GetCurrentProcess(); 72using Process currentProcess = Process.GetCurrentProcess(); 90using Process currentProcess = Process.GetCurrentProcess();
PresentationUI (1)
MS\Internal\Documents\RightsManagementProvider.cs (1)
1345System.Diagnostics.Process currentProcess = System.Diagnostics.Process.GetCurrentProcess();
Replay (1)
src\Compilers\Core\CommandLine\CompilerServerLogger.cs (1)
125var processId = Process.GetCurrentProcess().Id;
RunTests (1)
Program.cs (1)
276foreach (var proc in ProcessUtil.GetProcessTree(Process.GetCurrentProcess()).OrderBy(x => x.ProcessName))
Stress.TelemetryService (1)
GaugeMetrics.cs (1)
15var process = Process.GetCurrentProcess();
Swaggatherer (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
System.Configuration.ConfigurationManager (1)
System\Configuration\ClientConfigPaths.cs (1)
75using (Process currentProcess = Process.GetCurrentProcess())
System.Diagnostics.Process (1)
System\Diagnostics\Process.NonUap.cs (1)
25if (IsSelfOrDescendantOf(GetCurrentProcess()))
System.Diagnostics.TextWriterTraceListener (1)
System\Diagnostics\XmlWriterTraceListener.cs (1)
259using Process process = Process.GetCurrentProcess();
System.Drawing.Common.Tests (1)
System\Drawing\GdiPlusHandlesTests.cs (1)
30using Process currentProcess = Process.GetCurrentProcess();
System.Windows.Forms (1)
System\Windows\Forms\Application.cs (1)
1276Process process = Process.GetCurrentProcess();
System.Windows.Forms.UI.IntegrationTests (1)
ImageListTests.cs (1)
75(HANDLE)Process.GetCurrentProcess().Handle,
Templates.Blazor.Tests (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
Templates.Blazor.WebAssembly.Tests (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
Templates.Mvc.Tests (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
Templates.Tests (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
vbc (2)
src\Compilers\Core\CommandLine\CompilerServerLogger.cs (1)
125var processId = Process.GetCurrentProcess().Id;
src\Compilers\VisualBasic\vbc\Program.cs (1)
33using var logger = new CompilerServerLogger($"vbc {Process.GetCurrentProcess().Id}");
VBCSCompiler (2)
src\Compilers\Core\CommandLine\CompilerServerLogger.cs (1)
125var processId = Process.GetCurrentProcess().Id;
src\Compilers\Server\VBCSCompiler\ClientConnectionHandler.cs (1)
70new ShutdownBuildResponse(Process.GetCurrentProcess().Id),
Wasm.Performance.ConsoleHost (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;