47 references to NodeMode
Microsoft.Build (15)
BackEnd\Client\MSBuildClient.cs (1)
458NodeModeHelper.ToCommandLineArgument(NodeMode.OutOfProcServerNode)
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (1)
100CommandLineArgs: $"/noautoresponse /nologo {NodeModeHelper.ToCommandLineArgument(NodeMode.OutOfProcNode)} /nodeReuse:{ComponentHost.BuildParameters.EnableNodeReuse.ToString().ToLower()} /low:{ComponentHost.BuildParameters.LowPriority.ToString().ToLower()}",
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (10)
232NodeMode? expectedNodeMode = NodeModeHelper.ExtractFromCommandLine(commandLineArgs); 242if (expectedNodeMode == NodeMode.OutOfProcNode 473NodeMode? expectedNodeMode = null) 505private static IList<Process> FilterProcessesByNodeMode(Process[] processes, NodeMode expectedNodeMode, string expectedProcessName) 530NodeMode? processNodeMode = NodeModeHelper.ExtractFromCommandLine(commandLine); 644=> CountActiveNodesWithMode(NodeMode.OutOfProcNode); 647/// Counts the number of active MSBuild processes running with the specified <see cref="NodeMode"/>. 653internal static int CountActiveNodesWithMode(NodeMode nodeMode) 672private static (string expectedProcessName, IList<Process> nodeProcesses) GetPossibleRunningNodes(NodeMode? expectedNodeMode) 705NodeMode? processNodeMode = NodeModeHelper.ExtractFromCommandLine(commandLine);
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
787private string BuildCommandLineArgs(bool nodeReuseEnabled) => $"/nologo {NodeModeHelper.ToCommandLineArgument(NodeMode.OutOfProcTaskHostNode)} /nodereuse:{nodeReuseEnabled} /low:{ComponentHost.BuildParameters.LowPriority} /parentpacketversion:{NodePacketTypeExtensions.PacketVersion} ";
BackEnd\Components\Communications\RarNodeLauncher.cs (1)
76string commandLineArgs = string.Join(" ", ["/nologo", NodeModeHelper.ToCommandLineArgument(NodeMode.OutOfProcRarNode)]);
BackEnd\Node\OutOfProcServerNode.cs (1)
329int serverNodeCount = NodeProviderOutOfProcBase.CountActiveNodesWithMode(NodeMode.OutOfProcServerNode);
Microsoft.Build.CommandLine.UnitTests (13)
XMake_Tests.cs (13)
710MSBuildApp.ParseNodeMode("1").ShouldBe(NodeMode.OutOfProcNode); 711MSBuildApp.ParseNodeMode("2").ShouldBe(NodeMode.OutOfProcTaskHostNode); 712MSBuildApp.ParseNodeMode("3").ShouldBe(NodeMode.OutOfProcRarNode); 713MSBuildApp.ParseNodeMode("8").ShouldBe(NodeMode.OutOfProcServerNode); 719MSBuildApp.ParseNodeMode("OutOfProcNode").ShouldBe(NodeMode.OutOfProcNode); 720MSBuildApp.ParseNodeMode("outofprocnode").ShouldBe(NodeMode.OutOfProcNode); 721MSBuildApp.ParseNodeMode("OUTOFPROCNODE").ShouldBe(NodeMode.OutOfProcNode); 722MSBuildApp.ParseNodeMode("OutOfProcTaskHostNode").ShouldBe(NodeMode.OutOfProcTaskHostNode); 723MSBuildApp.ParseNodeMode("outofproctaskhostnode").ShouldBe(NodeMode.OutOfProcTaskHostNode); 724MSBuildApp.ParseNodeMode("OutOfProcRarNode").ShouldBe(NodeMode.OutOfProcRarNode); 725MSBuildApp.ParseNodeMode("outofprocrarnode").ShouldBe(NodeMode.OutOfProcRarNode); 726MSBuildApp.ParseNodeMode("OutOfProcServerNode").ShouldBe(NodeMode.OutOfProcServerNode); 727MSBuildApp.ParseNodeMode("outofprocservernode").ShouldBe(NodeMode.OutOfProcServerNode);
Microsoft.Build.Framework (11)
DebugUtils.cs (2)
101private static readonly Lazy<NodeMode?> ProcessNodeMode = new( 140public static bool IsInTaskHostNode() => ProcessNodeMode.Value == NodeMode.OutOfProcTaskHostNode;
NodeMode.cs (9)
46public static string ToCommandLineArgument(NodeMode nodeMode) => $"/nodemode:{(int)nodeMode}"; 54public static bool TryParse(string value, [NotNullWhen(true)] out NodeMode? nodeMode) 79private static bool TryParseImpl(string value, [NotNullWhen(true)] out NodeMode? nodeMode) 100if (Enum.IsDefined(typeof(NodeMode), intValue)) 102nodeMode = (NodeMode)intValue; 110if (Enum.TryParse(value, ignoreCase: true, out NodeMode enumValue) && Enum.IsDefined(typeof(NodeMode), enumValue)) 124public static NodeMode? ExtractFromCommandLine(string commandLine) 141if (TryParse(match.Groups["nodemode"].Value, out NodeMode? nodeMode))
MSBuild (8)
XMake.cs (8)
2945internal static NodeMode ParseNodeMode(string value) 2947if (!NodeModeHelper.TryParse(value, out NodeMode? nodeMode)) 2962NodeMode nodeMode = NodeMode.OutOfProcNode; // Default value 2977case NodeMode.OutOfProcNode: 2985case NodeMode.OutOfProcTaskHostNode: 2993case NodeMode.OutOfProcRarNode: 3008case NodeMode.OutOfProcServerNode: