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