当前位置: 首页>>代码示例>>C#>>正文


C# FdoCache.GetVirtualProperty方法代码示例

本文整理汇总了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);
				}
			}
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:28,代码来源:LexEntryUi.cs

示例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;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:17,代码来源:FilteredScrBooks.cs

示例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;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:23,代码来源:FilteredSequenceHandler.cs


注:本文中的SIL.FieldWorks.FDO.FdoCache.GetVirtualProperty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。