private void AddChapters(TocItem parent, IList <EpubChapter> chapters) { foreach (EpubChapter chapter in chapters) { TocItem child = new TocItem(chapter.AbsolutePath.GetHashCode(), chapter.Title); parent.AddChild(child); AddChapters(child, chapter.SubChapters); } }
public void AddChild(TocItem item) { item.ParentConcrete = this; ChildrenConcrete.Add(item); }