Exemplo n.º 1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Returns the verse reference as a string
		/// </summary>
		/// <param name="bcv">The book-chapter-verse representation of a reference</param>
		/// <param name="format">Indicates whether to format the reference for general purposes
		/// of using a format to facilitate exchange (e.g., XML).</param>
		/// <returns></returns>
		/// ------------------------------------------------------------------------------------
		public static string ToString(int bcv, RefStringFormat format)
		{
			string book = NumberToBookCode(GetBookFromBcv(bcv));
			int chapter = GetChapterFromBcv(bcv);
			int verse = GetVerseFromBcv(bcv);
			switch (format)
			{
				case RefStringFormat.Exchange:
					if (chapter == 0)
						return book + ksTitleRef;
					if (verse == 0 && chapter == 1)
						return book + ksIntroRef;
					goto default;

				default:
					return string.Format("{0} {1}:{2}", book, chapter, verse);
			}
		}
Exemplo n.º 2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Returns the verse reference as a string
		/// </summary>
		/// <param name="format">The format.</param>
		/// ------------------------------------------------------------------------------------
		public string ToString(RefStringFormat format)
		{
			return ToString(BBCCCVVV, format);
		}