Class StructureTreeNode
Structure tree node for hierarchical navigation
Solves the problem of flat structure search in SaveAsync
public class StructureTreeNode
Inheritance
Properties
Children
public List<StructureTreeNode> Children { get; set; }
Depth
public int Depth { get; }
IsLeaf
public bool IsLeaf { get; }
Parent
public StructureTreeNode? Parent { get; set; }
Path
public string Path { get; }
Structure
public IRedbStructure Structure { get; set; }
Methods
FindDescendant(long)
public StructureTreeNode? FindDescendant(long structureId)
FindDescendantByName(string)
public StructureTreeNode? FindDescendantByName(string name)
GetAllDescendants()
public List<StructureTreeNode> GetAllDescendants()
GetChildrenStructures()
public List<IRedbStructure> GetChildrenStructures()
GetLeafNodes()
public List<StructureTreeNode> GetLeafNodes()
HasDescendant(long)
public bool HasDescendant(long structureId)
IsDescendantOf(StructureTreeNode)
public bool IsDescendantOf(StructureTreeNode ancestor)
ToDetailedString()
public string ToDetailedString()
WalkTree(Action<StructureTreeNode>)
TREE TRAVERSAL
public void WalkTree(Action<StructureTreeNode> visitor)
WalkTreeWithDepth(Action<StructureTreeNode, int>, int)
public void WalkTreeWithDepth(Action<StructureTreeNode, int> visitor, int currentDepth = 0)