示例#1
0
        public void Read(ITreeReader reader)
        {
            _chapters = reader.ReadList <ArraySliceChapter <T> >(() => new ArraySliceChapter <T>());

            int chapterCount = _chapters?.Count ?? 0;

            if (chapterCount > 0)
            {
                // Infer count; N - 1 full chapters and the actual row count from the last
                _count = ArraySliceChapter <T> .ChapterRowCount * (chapterCount - 1) + _chapters[chapterCount - 1].Count;
            }
        }