本文整理汇总了C#中SIL.FieldWorks.FDO.FdoCache.GetVirtualProperty方法的典型用法代码示例。如果您正苦于以下问题:C# FdoCache.GetVirtualProperty方法的具体用法?C# FdoCache.GetVirtualProperty怎么用?C# FdoCache.GetVirtualProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SIL.FieldWorks.FDO.FdoCache
的用法示例。
在下文中一共展示了FdoCache.GetVirtualProperty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EnsureFlexVirtuals
/// ------------------------------------------------------------------------------------
/// <summary>
/// For dialogs which involve displaying lexical data, ensure that the virtual
/// properties needed by the XMLViews based displays are installed. Also ensure that
/// they aren't holding a pointer to a previous temporary cache which was disposed by a
/// previous lookup.
/// </summary>
/// <param name="cache">The cache.</param>
/// <param name="mediator">The mediator.</param>
/// ------------------------------------------------------------------------------------
public static void EnsureFlexVirtuals(FdoCache cache, Mediator mediator)
{
TSStringPropertyVirtualHandler vh =
cache.GetVirtualProperty("LexEntry", "HeadWord") as TSStringPropertyVirtualHandler;
if (vh == null || vh.Cache.IsDisposed)
{
// This can be called from TE...in that case, we don't complain about missing include
// files (true argument) but just trust that we put enough in the installer to make it work.
XmlDocument configuration = XmlUtils.LoadConfigurationWithIncludes(FlexConfigFile, true);
XmlNode configNode = configuration.SelectSingleNode("window");
BaseVirtualHandler.InstallVirtuals(configNode.SelectSingleNode("virtuals"), cache, true);
if (mediator != null)
{
mediator.PropertyTable.SetProperty("WindowConfiguration", configNode);
mediator.PropertyTable.SetPropertyPersistence("WindowConfiguration", false);
}
}
}
示例2: GetFilterInstance
/// ------------------------------------------------------------------------------------
/// <summary>
/// Gets virtual property handler corresponding to filter instance.
/// </summary>
/// <param name="cache"></param>
/// <param name="filterInstance">Number used to make filters unique for each main
/// window</param>
/// <returns></returns>
/// ------------------------------------------------------------------------------------
public static FilteredScrBooks GetFilterInstance(FdoCache cache, int filterInstance)
{
if (cache == null)
return null;
return cache.GetVirtualProperty(kFilteredClass,
kFilteredField + "_" + filterInstance) as FilteredScrBooks;
}
示例3: GetFilterInstance
/// ------------------------------------------------------------------------------------
/// <summary>
/// Gets virtual property handler corresponding to filter instance.
/// </summary>
/// <param name="cache">The FDO Cache</param>
/// <param name="owningClassId">The ID of the class which will own this virtual
/// property</param>
/// <param name="filter">The filter whose virtual handler we want</param>
/// <param name="filterInstance">Number used to make filters unique for each main
/// window</param>
/// <returns>The existing virtual handler for this filter and instance, if any;
/// otherwise <c>null</c></returns>
/// <remarks>TODO (TE-3941): pass sort method also (and use it)</remarks>
/// ------------------------------------------------------------------------------------
public static FilteredSequenceHandler GetFilterInstance(FdoCache cache, int owningClassId,
IFilter filter, int filterInstance)
{
if (cache == null)
return null;
return cache.GetVirtualProperty(cache.GetClassName((uint)owningClassId),
GetVirtualPropertyName(filter, null, filterInstance)) as FilteredSequenceHandler;
}