本文整理汇总了C#中SIL.FieldWorks.FDO.FdoCache.GetDestinationClass方法的典型用法代码示例。如果您正苦于以下问题:C# FdoCache.GetDestinationClass方法的具体用法?C# FdoCache.GetDestinationClass怎么用?C# FdoCache.GetDestinationClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SIL.FieldWorks.FDO.FdoCache
的用法示例。
在下文中一共展示了FdoCache.GetDestinationClass方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TryFindPluralFormFromFlid
/// <summary>
/// looks up plural form alternative first for given flid, secondly for its destination class.
/// </summary>
/// <param name="cache"></param>
/// <param name="tbl"></param>
/// <param name="owningFlid"></param>
/// <param name="titleStr">*{dstClass}* if couldn't find result.</param>
/// <returns>true if we found an alternate form. false if titleStr is null or in *{key}* format.</returns>
public static bool TryFindPluralFormFromFlid(FdoCache cache, StringTable tbl, uint owningFlid, out string titleStr)
{
titleStr = null;
// first see if we can find an expanded name for the name of a flid.
string flidName = cache.MetaDataCacheAccessor.GetFieldName(owningFlid);
if (!String.IsNullOrEmpty(flidName))
{
if (TryFindString(tbl, "AlternativeTitles", flidName, out titleStr))
return true;
}
// secondly, see if we can find the plural form for the destination class.
uint dstClass = cache.GetDestinationClass(owningFlid);
return TryFindPluralFormFromClassId(cache, tbl, dstClass, out titleStr);
}