コード例 #1
0
ファイル: NonVerse.cs プロジェクト: pstephens/BibleLegacy
        public BookPostscript(Book book, Int32 nonVerseId, String data)
            : base(nonVerseId, data)
        {
            if (book == null)
                throw new ArgumentNullException("book");

            _book = book;
        }
コード例 #2
0
ファイル: Chapter.cs プロジェクト: pstephens/BibleLegacy
        // 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);
        }
コード例 #3
0
ファイル: BibleAccum.cs プロジェクト: pstephens/BibleLegacy
 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
ファイル: BibleAccum.cs プロジェクト: pstephens/BibleLegacy
 // Implementation
 private void InitAccum()
 {
     _bible = new Bible();
     _curBook = null;
     _curChapter = null;
     _preAccum = null;
     _lineNo = 0;
 }
コード例 #5
0
ファイル: Book.cs プロジェクト: pstephens/BibleLegacy
        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));
            }
        }