本文整理汇总了C#中SIL.FieldWorks.FDO.FdoCache.SetUnicodeProperty方法的典型用法代码示例。如果您正苦于以下问题:C# FdoCache.SetUnicodeProperty方法的具体用法?C# FdoCache.SetUnicodeProperty怎么用?C# FdoCache.SetUnicodeProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SIL.FieldWorks.FDO.FdoCache
的用法示例。
在下文中一共展示了FdoCache.SetUnicodeProperty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExtractLIFTResidue
/// <summary>
/// Scan ImportResidue for XML looking string inserted by LIFT import. If any is found,
/// move it from ImportResidue to LiftResidue.
/// </summary>
/// <returns>string containing any LIFT import residue found in ImportResidue</returns>
public static string ExtractLIFTResidue(FdoCache cache, int hvo, int flidImportResidue,
int flidLiftResidue)
{
TsStringAccessor tsa = new TsStringAccessor(cache, hvo, flidImportResidue);
if (tsa.UnderlyingTsString == null || tsa.Length < 13)
return null;
int idx = tsa.Text.IndexOf("<lift-residue");
if (idx >= 0)
{
string sLiftResidue = tsa.Text.Substring(idx);
int idx2 = sLiftResidue.IndexOf("</lift-residue>");
if (idx2 >= 0)
{
idx2 += 15;
if (sLiftResidue.Length > idx2)
sLiftResidue = sLiftResidue.Substring(0, idx2);
}
if (flidLiftResidue != 0)
{
int cch = sLiftResidue.Length;
ITsStrBldr tsb = tsa.UnderlyingTsString.GetBldr();
tsb.Replace(idx, idx + cch, null, null);
tsa.UnderlyingTsString = tsb.GetString(); // remove from ImportResidue
cache.SetUnicodeProperty(hvo, flidLiftResidue, sLiftResidue);
}
return sLiftResidue;
}
else
{
return null;
}
}