/// <summary> /// Change the passed VerseRef to be this versification. /// </summary> /// <param name="vref"></param> public void ChangeVersification(IVerseReference vref) { if (vref.Versification == scrVers) { return; } // Map from existing to standard versification string verse = vref.ToString(); string verse2; Get(vref.Versification).toStandard.TryGetValue(verse, out verse2); if (verse2 == null) { verse2 = verse; } // Map from standard versification to this versification string verse3; fromStandard.TryGetValue(verse2, out verse3); if (verse3 == null) { verse3 = verse2; } // If verse has changed, parse new value if (verse != verse3) { vref.Parse(verse3); } vref.Versification = scrVers; }
/// <summary> /// Change the passed VerseRef to be this versification. /// </summary> /// <param name="vref"></param> public void ChangeVersification(IVerseReference vref) { if (vref.Versification == scrVers) return; // Map from existing to standard versification string verse = vref.ToString(); string verse2; Get(vref.Versification).toStandard.TryGetValue(verse, out verse2); if (verse2 == null) verse2 = verse; // Map from standard versification to this versification string verse3; fromStandard.TryGetValue(verse2, out verse3); if (verse3 == null) verse3 = verse2; // If verse has changed, parse new value if (verse != verse3) vref.Parse(verse3); vref.Versification = scrVers; }