2 instantiations of NodeContext
Microsoft.Build (2)
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (2)
209
NodeContext context =
new
(0, nodeProcess, nodeStream, factory, terminateNode, negotiatedVersion);
503
NodeContext nodeContext =
new
(nodeId, nodeToReuse, nodeStream, factory, terminateNode, negotiatedVersion, handshakeOptions, DoesConnectionPersistAcrossBuilds(handshakeOptions, negotiatedVersion));
34 references to NodeContext
Microsoft.Build (34)
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (5)
27
private ConcurrentDictionary<int,
NodeContext
> _nodeContexts;
105
IList<
NodeContext
> nodeContexts = GetNodes(nodeLaunchData, nextNodeId, factory, NodeContextCreated, NodeContextTerminated, numberOfNodesToCreate);
116
void NodeContextCreated(
NodeContext
context)
149
var contextsToShutDown = new List<
NodeContext
>(_nodeContexts.Values);
183
_nodeContexts = new ConcurrentDictionary<int,
NodeContext
>();
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (11)
82
internal delegate void NodeContextCreatedDelegate(
NodeContext
context);
104
protected void SendData(
NodeContext
context, INodePacket packet)
115
protected void ShutdownConnectedNodes(List<
NodeContext
> contextsToShutDown, bool enableReuse)
133
foreach (
NodeContext
nodeContext in contextsToShutDown)
205
internal static
NodeContext
RequestNodeShutdown(Process nodeProcess, Stream nodeStream, NodeContextTerminateDelegate terminateNode, byte negotiatedVersion)
209
NodeContext
context = new(0, nodeProcess, nodeStream, factory, terminateNode, negotiatedVersion);
233
protected IList<
NodeContext
> GetNodes(
316
ConcurrentQueue<
NodeContext
> nodeContexts = new();
503
NodeContext
nodeContext = new(nodeId, nodeToReuse, nodeStream, factory, terminateNode, negotiatedVersion, handshakeOptions, DoesConnectionPersistAcrossBuilds(handshakeOptions, negotiatedVersion));
1385
NodeContext
context = (
NodeContext
)state;
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (17)
118
private ConcurrentDictionary<TaskHostNodeKey,
NodeContext
> _nodeContexts;
316
List<
NodeContext
> contextsToShutDown = [.. _nodeContexts.Values];
329
foreach (
NodeContext
context in contextsToShutDown)
357
foreach (
NodeContext
context in contextsToShutDown)
393
internal ConcurrentDictionary<TaskHostNodeKey,
NodeContext
> ConnectedNodes => _nodeContexts;
427
_nodeContexts = new ConcurrentDictionary<TaskHostNodeKey,
NodeContext
>();
912
out
NodeContext
connection)
922
KeyValuePair<TaskHostNodeKey,
NodeContext
>? reusableConnection = null;
923
foreach (KeyValuePair<TaskHostNodeKey,
NodeContext
> existing in _nodeContexts)
987
if (!_nodeContexts.TryGetValue(nodeKey, out
NodeContext
context))
1042
internal bool TryReactivateTaskHandler(
NodeContext
context, INodePacketHandler handler)
1073
internal void DisconnectFromHost(
NodeContext
context, INodePacketHandler handler)
1141
void OnNodeContextCreated(
NodeContext
context) => NodeContextCreated(context, nodeKey);
1145
IList<
NodeContext
> nodeContexts = GetNodes(
1287
internal void NodeContextCreated(
NodeContext
context, TaskHostNodeKey nodeKey)
1307
private bool TryActivateNode(
NodeContext
context)
1325
internal bool TryAttachTaskHandler(
NodeContext
context, INodePacketHandler handler)
Instance\TaskFactories\TaskHostTask.cs (1)
107
private NodeProviderOutOfProcBase.
NodeContext
_taskHostConnection;