Esempio n. 1
0
 public Tafsir_Commentary(string tafsirCode, int chapter, int verse)
 {
     QuranVerseHelper.Clip(
         chapter: ref chapter,
         verse: ref verse
         );
     this.Tafsir     = SharedData.Document.TafsirDocument[tafsirCode];
     this.Chapter    = SharedData.Document.QuranDocument[chapter];
     this.Verse      = verse;
     this.Commentary = Tafsir.CommentaryForVerse(chapter, verse);
 }
Esempio n. 2
0
        void ReadCommentary(int chapterIndex, XElement commentaryNode)
        {
            int firstVerse          = int.Parse(commentaryNode.Element("firstVerse").Value);
            int lastVerse           = int.Parse(commentaryNode.Element("lastVerse").Value);
            var verseRangeReference = new VerseRangeReference(
                chapter: chapterIndex,
                firstVerse: firstVerse,
                lastVerse: lastVerse
                );
            var text = commentaryNode.Elements("text").Select(x => x.Value);

            var comment = new TafsirComment(
                verseReference: verseRangeReference,
                text: text
                );

            Tafsir.AddComment(comment);
        }