35 references to NodeMode
Microsoft.Build (15)
BackEnd\Client\MSBuildClient.cs (1)
464NodeModeHelper.ToCommandLineArgument(NodeMode.OutOfProcServerNode)
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (1)
99CommandLineArgs: $"/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) 460NodeMode? expectedNodeMode = null) 578private static IList<Process> FilterProcessesByNodeMode(List<Process> processes, NodeMode expectedNodeMode, string expectedProcessName) 603NodeMode? processNodeMode = NodeModeHelper.ExtractFromCommandLine(commandLine); 712=> CountActiveNodesWithMode(NodeMode.OutOfProcNode); 715/// Counts the number of active MSBuild processes running with the specified <see cref="NodeMode"/>. 721internal static int CountActiveNodesWithMode(NodeMode nodeMode) 740private static (string expectedProcessName, IList<Process> nodeProcesses) GetPossibleRunningNodes(NodeMode? expectedNodeMode) 773NodeMode? processNodeMode = NodeModeHelper.ExtractFromCommandLine(commandLine);
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
861private 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)
336int serverNodeCount = NodeProviderOutOfProcBase.CountActiveNodesWithMode(NodeMode.OutOfProcServerNode);
Microsoft.Build.Framework (12)
DebugUtils.cs (2)
101private static readonly Lazy<NodeMode?> ProcessNodeMode = new( 140public static bool IsInTaskHostNode() => ProcessNodeMode.Value == NodeMode.OutOfProcTaskHostNode;
NodeMode.cs (10)
46public static string ToCommandLineArgument(NodeMode nodeMode) => $"/nodemode:{(int)nodeMode}"; 54public static bool TryParse(string value, [NotNullWhen(true)] out NodeMode? nodeMode) 70public static bool TryParse(ReadOnlySpan<char> value, [NotNullWhen(true)] out NodeMode? nodeMode) 77private static bool TryParseImpl(ReadOnlySpan<char> 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) 139if (TryParse(match.Groups["nodemode"].ValueSpan, out NodeMode? nodeMode))
MSBuild (8)
XMake.cs (8)
2958internal static NodeMode ParseNodeMode(string value) 2960if (!NodeModeHelper.TryParse(value, out NodeMode? nodeMode)) 2975NodeMode nodeMode = NodeMode.OutOfProcNode; // Default value 2990case NodeMode.OutOfProcNode: 2998case NodeMode.OutOfProcTaskHostNode: 3006case NodeMode.OutOfProcRarNode: 3021case NodeMode.OutOfProcServerNode: