public UsfmParserState(ScrStylesheet scrStylesheet, VerseRef verseRef) { ScrStylesheet = scrStylesheet; Stack = new List <UsfmParserElement>(); VerseRef = verseRef.Clone(); VerseOffset = 0; }
public List <Term> TermsInRange(VerseRef firstReference, VerseRef lastReference) { VerseRef first = firstReference.Clone(); VerseRef last = lastReference.Clone(); first.ChangeVersification(ScrVers.Original); last.ChangeVersification(ScrVers.Original); IEnumerable <Term> terms2; /* * if (first.Book == last.Book && first.Chapter == last.Chapter) * terms2 = TermsInChapter(first); * else */ terms2 = terms; int firstBCV = int.Parse(first.BBBCCCVVV()); int lastBCV = int.Parse(last.BBBCCCVVV()); return(terms2.Where(term => term.HasReferencesInRange(firstBCV, lastBCV)).ToList()); }