public BookPostscript(Book book, Int32 nonVerseId, String data) : base(nonVerseId, data) { if (book == null) throw new ArgumentNullException("book"); _book = book; }
// Constructor public Chapter(Book book, Int32 chapId, Int32 chapNum, ChapterPreface preface) { if(book == null) throw new ArgumentNullException("book"); _book = book; _chapId = chapId; _chapNum = chapNum; _verses = new VerseCollection(); _preface = preface; if(_preface != null) _preface.SetChapter(this); }
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; }
public Book this[BookName bookId] { get { // Assertions var idx = (Int32) bookId; if(idx < 0 || idx > 65) throw new ArgumentNullException("bookId"); return _books[idx] ?? (_books[idx] = new Book(_bible, bookId)); } }