public INodes GetSuccessorNodes(Id nodeId) { IGraphNode graphNode = _nodes.GetById(nodeId); if (graphNode == null) { // node doesn't exists throw new MrpRunException($"Given node ({graphNode}) doesn't exists in graph."); } GraphNodes successors = graphNode.GetSuccessors(); if (successors.Any() == false) { return(null); } return(new Nodes(successors.Select(x => x.GetNode()))); }
public T GetById(Id id) { return(StackSet.GetById(id)); }