40 references to NodeMode
Microsoft.Build (16)
BackEnd\Client\MSBuildClient.cs (2)
578
NodeModeHelper.ToCommandLineArgument(
NodeMode
.OutOfProcServerNode)
583
NodeModeHelper.ToCommandLineArgument(
NodeMode
.OutOfProcServerNode),
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (1)
99
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)
259
NodeMode
? expectedNodeMode = NodeModeHelper.ExtractFromCommandLine(commandLineArgs);
269
if (expectedNodeMode ==
NodeMode
.OutOfProcNode)
533
NodeMode
? expectedNodeMode = null)
651
private static IList<Process> FilterProcessesByNodeMode(List<Process> processes,
NodeMode
expectedNodeMode, string expectedProcessName)
676
NodeMode
? processNodeMode = NodeModeHelper.ExtractFromCommandLine(commandLine);
785
=> CountActiveNodesWithMode(
NodeMode
.OutOfProcNode);
788
/// Counts the number of active MSBuild processes running with the specified <see cref="
NodeMode
"/>.
794
internal static int CountActiveNodesWithMode(
NodeMode
nodeMode)
813
private static (string expectedProcessName, IList<Process> nodeProcesses) GetPossibleRunningNodes(
NodeMode
? expectedNodeMode)
846
NodeMode
? processNodeMode = NodeModeHelper.ExtractFromCommandLine(commandLine);
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
1282
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)
367
int serverNodeCount = NodeProviderOutOfProcBase.CountActiveNodesWithMode(
NodeMode
.OutOfProcServerNode);
Microsoft.Build.Framework (14)
DebugUtils.cs (4)
101
private static readonly Lazy<
NodeMode
?> ProcessNodeMode = new(
140
public static bool IsInTaskHostNode() => ProcessNodeMode.Value ==
NodeMode
.OutOfProcTaskHostNode;
143
/// Returns the <see cref="
NodeMode
"/> this process was launched with, or null for the entry process.
145
public static
NodeMode
? GetProcessNodeMode() => ProcessNodeMode.Value;
NodeMode.cs (10)
46
public static string ToCommandLineArgument(
NodeMode
nodeMode) => $"/nodemode:{(int)nodeMode}";
54
public static bool TryParse(string value, [NotNullWhen(true)] out
NodeMode
? nodeMode)
70
public static bool TryParse(ReadOnlySpan<char> value, [NotNullWhen(true)] out
NodeMode
? nodeMode)
77
private static bool TryParseImpl(ReadOnlySpan<char> 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))
126
public static
NodeMode
? ExtractFromCommandLine(string commandLine)
141
if (TryParse(match.Groups["nodemode"].ValueSpan, out
NodeMode
? nodeMode))
MSBuild (10)
XMake.cs (10)
327
internal static bool OwnsProcessTelemetrySession(
NodeMode
? nodeMode) => nodeMode is null or
NodeMode
.OutOfProcServerNode;
3453
internal static
NodeMode
ParseNodeMode(string value)
3455
if (!NodeModeHelper.TryParse(value, out
NodeMode
? nodeMode))
3470
NodeMode
nodeMode =
NodeMode
.OutOfProcNode; // Default value
3485
case
NodeMode
.OutOfProcNode:
3493
case
NodeMode
.OutOfProcTaskHostNode:
3501
case
NodeMode
.OutOfProcRarNode:
3516
case
NodeMode
.OutOfProcServerNode: