本文整理汇总了C#中SILUBS.SharedScrUtils.BCVRef.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# BCVRef.ToString方法的具体用法?C# BCVRef.ToString怎么用?C# BCVRef.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SILUBS.SharedScrUtils.BCVRef
的用法示例。
在下文中一共展示了BCVRef.ToString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ParseMappingLine
// Parse lines giving number of verses for each chapter like
// GEN 1:10 2:23 ...
private static void ParseMappingLine(string fileName, VersificationTable versification, string line)
{
try
{
string[] parts = line.Split('=');
string[] leftPieces = parts[0].Trim().Split('-');
string[] rightPieces = parts[1].Trim().Split('-');
BCVRef left = new BCVRef(leftPieces[0]);
int leftLimit = leftPieces.GetUpperBound(0) == 0 ? 0 : int.Parse(leftPieces[1]);
BCVRef right = new BCVRef(rightPieces[0]);
while (true)
{
versification.toStandard[left.ToString()] = right.ToString();
versification.fromStandard[right.ToString()] = left.ToString();
if (left.Verse >= leftLimit)
break;
left.Verse = left.Verse + 1;
right.Verse = right.Verse + 1;
}
}
catch
{
// ENHANCE: Make it so the TE version of Localizer can have its own resources for stuff
// like this.
throw new Exception("Invalid [" + line + "] " + fileName);
}
}
示例2: ToString_NormalVerse
public void ToString_NormalVerse()
{
BCVRef exodusTitleRef = new BCVRef(2004006);
Assert.AreEqual("EXO 4:6", exodusTitleRef.ToString(BCVRef.RefStringFormat.General));
Assert.AreEqual("EXO 4:6", exodusTitleRef.ToString(BCVRef.RefStringFormat.Exchange));
}
示例3: ToString_Title
public void ToString_Title()
{
BCVRef genesisTitleRef = new BCVRef(1000000);
Assert.AreEqual("GEN 0:0", genesisTitleRef.ToString(BCVRef.RefStringFormat.General));
Assert.AreEqual("GEN Title", genesisTitleRef.ToString(BCVRef.RefStringFormat.Exchange));
}
示例4: ToString_BogusIntro
public void ToString_BogusIntro()
{
BCVRef genesisTitleRef = new BCVRef(1002000);
Assert.AreEqual("GEN 2:0", genesisTitleRef.ToString(BCVRef.RefStringFormat.General));
Assert.AreEqual("GEN 2:0", genesisTitleRef.ToString(BCVRef.RefStringFormat.Exchange));
}
示例5: GetRef
/// ------------------------------------------------------------------------------------
/// <summary>
/// Gets the string representation of the specified BCVRef for serialization.
/// </summary>
/// ------------------------------------------------------------------------------------
private string GetRef(BCVRef bcvref)
{
// When writing pure OXES, don't use this attribute, use oxesRef
return (m_serializingForOxes || bcvref == null || bcvref.IsEmpty ?
null : bcvref.ToString(BCVRef.RefStringFormat.Exchange));
}