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