public IStackSet <INode> GetAllUniqueNodes() { IStackSet <INode> uniqueNodes = new StackSet <INode>(); uniqueNodes.PushAll(_nodes.Select(x => x.GetNode())); if (uniqueNodes.Any() == false) { return(null); } return(uniqueNodes); }