Пример #1
0
 public Verse(Int32 verseId, Int32 verseNum, String verse, Chapter chap)
 {
     _verseId = verseId;
     _verseNum = verseNum;
     _verse = verse;
     _chap = chap;
 }
Пример #2
0
        private void SetupNewCurrentChapter(Int32 chap)
        {
            // Calculate chapter preface
            ChapterPreface preface;
            if (_preAccum != null)
            {
                preface = new ChapterPreface(_bible.GetNextVerseId(), _preAccum);
                _bible.NonVerses.Add(preface);
            }
            else
                preface = null;

            var chapObj = new Chapter(
                _curBook, _bible.GetNextChapterId(), chap, preface);
            _curChapter = chapObj;
            _curBook.Chapters.Add(chapObj);
            _preAccum = null;
        }
Пример #3
0
 private void ProcessBook(String line)
 {
     var bookTitle = line.Substring(2);
     _curChapter = null;
     var bookName = (BookName) Enum.Parse(typeof (BookName), bookTitle);
     _curBook = _bible.Books[bookName];
 }
Пример #4
0
 // Implementation
 private void InitAccum()
 {
     _bible = new Bible();
     _curBook = null;
     _curChapter = null;
     _preAccum = null;
     _lineNo = 0;
 }
Пример #5
0
        // Constructor
        internal void SetChapter(Chapter chap)
        {
            if (chap == null)
                throw new ArgumentNullException("chap");

            _chapter = chap;
        }
Пример #6
0
        // Methods
        public void Add(Chapter chap)
        {
            if(chap == null)
                throw new ArgumentNullException("chap");

            _data.Add(chap);
        }