Beispiel #1
0
        public override object Clone()
        {
            var result = new ModuleVersePointer(this);

            CopyPropertiesTo(result);

            return(result);
        }
        private void ProcessBookDifference(
            int bookIndex,
            BibleBookDifference bookDifference,
            BibleTranslationDifferencesBaseVersesFormula.VerseFactory verseFactory)
        {
            int?valueVersesCount = string.IsNullOrEmpty(bookDifference.ValueVersesCount)
                ? (int?)null
                : int.Parse(bookDifference.ValueVersesCount);

            var baseVersesFormula = new BibleTranslationDifferencesBaseVersesFormula(
                bookIndex,
                bookDifference.BaseVerses,
                bookDifference.ParallelVerses,
                bookDifference.CorrespondenceType,
                bookDifference.SkipCheck,
                bookDifference.EmptyVerse,
                verseFactory);

            var parallelVersesFormula = new BibleTranslationDifferencesParallelVersesFormula(
                bookDifference.ParallelVerses,
                baseVersesFormula,
                bookDifference.CorrespondenceType,
                valueVersesCount,
                bookDifference.SkipCheck,
                bookDifference.EmptyVerse);

            ModuleVersePointer prevVerse = null;

            foreach (var verse in baseVersesFormula.GetAllVerses())
            {
                var parallelVerses = new ComparisonVersesInfo(parallelVersesFormula.GetParallelVerses(verse, prevVerse));

                BibleVersesDifferences[bookIndex].Add(verse, parallelVerses);

                prevVerse = parallelVerses.Last();
            }
        }