Exemple #1
0
        public BookPostscript(Book book, Int32 nonVerseId, String data)
            : base(nonVerseId, data)
        {
            if (book == null)
                throw new ArgumentNullException("book");

            _book = book;
        }
Exemple #2
0
        // 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);
        }
Exemple #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];
 }
Exemple #4
0
 // Implementation
 private void InitAccum()
 {
     _bible = new Bible();
     _curBook = null;
     _curChapter = null;
     _preAccum = null;
     _lineNo = 0;
 }
Exemple #5
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));
            }
        }