public Verse(Int32 verseId, Int32 verseNum, String verse, Chapter chap) { _verseId = verseId; _verseNum = verseNum; _verse = verse; _chap = chap; }
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; }
private void ProcessBook(String line) { var bookTitle = line.Substring(2); _curChapter = null; var bookName = (BookName) Enum.Parse(typeof (BookName), bookTitle); _curBook = _bible.Books[bookName]; }
// Implementation private void InitAccum() { _bible = new Bible(); _curBook = null; _curChapter = null; _preAccum = null; _lineNo = 0; }
// Constructor internal void SetChapter(Chapter chap) { if (chap == null) throw new ArgumentNullException("chap"); _chapter = chap; }
// Methods public void Add(Chapter chap) { if(chap == null) throw new ArgumentNullException("chap"); _data.Add(chap); }