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


C# ILexEntry.CreateVariantEntryAndBackRef方法代码示例

本文整理汇总了C#中ILexEntry.CreateVariantEntryAndBackRef方法的典型用法代码示例。如果您正苦于以下问题:C# ILexEntry.CreateVariantEntryAndBackRef方法的具体用法?C# ILexEntry.CreateVariantEntryAndBackRef怎么用?C# ILexEntry.CreateVariantEntryAndBackRef使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ILexEntry的用法示例。


在下文中一共展示了ILexEntry.CreateVariantEntryAndBackRef方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetVariantOf

			/// <summary>
			/// create a variant and link it to the given leMain entry
			/// and confirm this analysis on the given (monomorphemic) cba.
			/// </summary>
			/// <param name="iSegment"></param>
			/// <param name="iSegForm"></param>
			/// <param name="leMain"></param>
			/// <param name="variantType"></param>
			/// <returns>hvo of the resulting LexEntryRef</returns>
			virtual public ILexEntryRef SetVariantOf(int iSegment, int iSegForm, ILexEntry leMain, ILexEntryType variantType)
			{
				if (variantType == null)
					throw new ArgumentNullException("requires non-null variantType parameter.");
				// for now, just create the variant entry and the variant of target, treating the wordform as monomorphemic.
				ITsString tssVariantLexemeForm = GetBaselineText(iSegment, iSegForm);
				ILexEntryRef ler = leMain.CreateVariantEntryAndBackRef(variantType, tssVariantLexemeForm);
				ILexEntry variant = ler.Owner as ILexEntry;
				ArrayList morphs = new ArrayList(1);
				morphs.Add(variant.LexemeFormOA);
				BreakIntoMorphs(iSegment, iSegForm, morphs);
				ILexEntry mainEntry;
				ILexSense mainSense;
				MorphServices.GetMainEntryAndSenseStack(ler.ComponentLexemesRS.First() as IVariantComponentLexeme, out mainEntry, out mainSense);
				SetMorphSense(iSegment, iSegForm, 0, mainSense);
				return ler;
			}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:26,代码来源:ParagraphParserTests.cs

示例2: SetVariantOf

			/// <summary>
			/// create a variant and link it to the given leMain entry
			/// and confirm this analysis on the given (monomorphemic) cba.
			/// </summary>
			/// <param name="iSegment"></param>
			/// <param name="iSegForm"></param>
			/// <param name="leMain"></param>
			/// <param name="variantTypeRevAbbr"></param>
			/// <returns>hvo of the resulting LexEntryRef</returns>
			virtual internal ILexEntryRef SetVariantOf(int iSegment, int iSegForm, ILexEntry leMain, string variantTypeRevAbbr)
			{
				ILexEntryType variantType = null;
				foreach (ILexEntryType let in m_cache.LangProject.LexDbOA.VariantEntryTypesOA.ReallyReallyAllPossibilities)
				{
					if (let.ReverseAbbr.AnalysisDefaultWritingSystem == variantTypeRevAbbr)
					{
						variantType = let;
						break;
					}
				}

				// for now, just create the variant entry and the variant of target, treating the wordform as monomorphemic.
				int hvoCbaActual = GetSegmentForm(iSegment, iSegForm);
				ITsString tssVariantLexemeForm = GetBaselineText(hvoCbaActual);
				ILexEntryRef ler = leMain.CreateVariantEntryAndBackRef(variantType, tssVariantLexemeForm);
				ILexEntry variant = (ler as LexEntryRef).Owner as ILexEntry;
				ArrayList morphs = new ArrayList(1);
				morphs.Add(variant.LexemeFormOA);
				BreakIntoMorphs(iSegment, iSegForm, morphs);
				return ler;
			}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:31,代码来源:ParagraphParserTests.cs


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