public void ReadAndStop() { // Then read the nodes from the org var readNodeRequest = _api.ReadNodes(_testOrganization); Assert.IsTrue(readNodeRequest.Success); //Iterate through all nodes and stop them if they are running var allNodes = readNodeRequest.BacktestNodes.Concat(readNodeRequest.LiveNodes).Concat(readNodeRequest.ResearchNodes); foreach (var Node in allNodes) { // If it is busy then stop it if (Node.Busy) { var stopNodeRequest = _api.StopNode(Node.Id, _testOrganization); Assert.IsTrue(stopNodeRequest.Success); } } }