public void ListOfSectionsToBeIteratedForAnchors_Add(SectionNode section) { if (!m_ListOfSectionsToBeIteratedForAnchors.Contains(section)) { m_ListOfSectionsToBeIteratedForAnchors.Add(section); } for (int i = 0; i < section.SectionChildCount; i++) { ListOfSectionsToBeIteratedForAnchors_Add(section.SectionChild(i)); } }
private void TraverseAndCollectAllSubSections(SectionNode node, List <SectionNode> sectionsList) { if (node.SectionChildCount == 0) { return; } else { for (int i = 0; i < node.SectionChildCount; i++) { SectionNode n = node.SectionChild(i); sectionsList.Add(n); TraverseAndCollectAllSubSections(n, sectionsList); } } }