Пример #1
0
        /// <summary>
        /// Writes this versification to the specified fileName.
        /// </summary>
        /// <param name="fileName">full path where versification file should be written</param>
        /// <exception cref="IOException">if the fileName cannot be written</exception>
        public void Save(string fileName)
        {
            StringBuilder builder = new StringBuilder();

            using (StringWriter writer = new StringWriter(builder))
                VersInfo.WriteToStream(writer);

            File.WriteAllText(fileName, builder.ToString());
        }
Пример #2
0
 /// <summary>
 /// Gets last chapter number in the given book.
 /// </summary>
 public int GetLastChapter(int bookNum)
 {
     return(VersInfo.LastChapter(bookNum));
 }
Пример #3
0
 /// <summary>
 /// Gets last book in this project
 /// </summary>
 public int GetLastBook()
 {
     return(VersInfo.LastBook());
 }
Пример #4
0
 /// <summary>
 /// Get the string description of the versification.
 /// </summary>
 public override string ToString()
 {
     return(VersInfo.ToString());
 }
Пример #5
0
 /// <summary>
 /// Change the passed VerseRef to be this versification.
 /// </summary>
 public void ChangeVersification(ref VerseRef vref)
 {
     VersInfo.ChangeVersification(ref vref);
 }
Пример #6
0
 /// <summary>
 /// Change the versification of an entry with Verse like 1-3 or 1,3a.
 /// Can't really work in the most general case because the verse parts could become separate chapters.
 /// </summary>
 /// <returns>true if successful (i.e. all verses were in the same the same chapter in the new versification),
 /// false if the changing resulted in the reference spanning chapters (which makes the results undefined)</returns>
 public bool ChangeVersificationWithRanges(VerseRef vref, out VerseRef newRef)
 {
     return(VersInfo.ChangeVersificationWithRanges(vref, out newRef));
 }
Пример #7
0
 /// <summary>
 /// Gets a list of verse segments for the specified reference or null if the specified
 /// reference does not have segments defined in the versification.
 /// </summary>
 public string[] VerseSegments(int bbbcccvvv)
 {
     return(VersInfo.VerseSegments(bbbcccvvv));
 }
Пример #8
0
 /// <summary>
 /// Determines whether the specified verse is excluded in the versification.
 /// </summary>
 public bool IsExcluded(int bbbcccvvv)
 {
     return(VersInfo != null && VersInfo.IsExcluded(bbbcccvvv));
 }
Пример #9
0
 /// <summary>
 /// Gets last verse number in the given book/chapter.
 /// </summary>
 public int GetLastVerse(int bookNum, int chapterNum)
 {
     return(VersInfo.LastVerse(bookNum, chapterNum));
 }