46 references to NodeMode
Microsoft.Build (14)
BackEnd\Client\MSBuildClient.cs (1)
464NodeModeHelper.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 (9)
232NodeMode? expectedNodeMode = NodeModeHelper.ExtractFromCommandLine(commandLineArgs); 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)
848private 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.CommandLine.UnitTests (13)
XMake_Tests.cs (13)
708MSBuildApp.ParseNodeMode("1").ShouldBe(NodeMode.OutOfProcNode); 709MSBuildApp.ParseNodeMode("2").ShouldBe(NodeMode.OutOfProcTaskHostNode); 710MSBuildApp.ParseNodeMode("3").ShouldBe(NodeMode.OutOfProcRarNode); 711MSBuildApp.ParseNodeMode("8").ShouldBe(NodeMode.OutOfProcServerNode); 717MSBuildApp.ParseNodeMode("OutOfProcNode").ShouldBe(NodeMode.OutOfProcNode); 718MSBuildApp.ParseNodeMode("outofprocnode").ShouldBe(NodeMode.OutOfProcNode); 719MSBuildApp.ParseNodeMode("OUTOFPROCNODE").ShouldBe(NodeMode.OutOfProcNode); 720MSBuildApp.ParseNodeMode("OutOfProcTaskHostNode").ShouldBe(NodeMode.OutOfProcTaskHostNode); 721MSBuildApp.ParseNodeMode("outofproctaskhostnode").ShouldBe(NodeMode.OutOfProcTaskHostNode); 722MSBuildApp.ParseNodeMode("OutOfProcRarNode").ShouldBe(NodeMode.OutOfProcRarNode); 723MSBuildApp.ParseNodeMode("outofprocrarnode").ShouldBe(NodeMode.OutOfProcRarNode); 724MSBuildApp.ParseNodeMode("OutOfProcServerNode").ShouldBe(NodeMode.OutOfProcServerNode); 725MSBuildApp.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)
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: