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


C# IRepository.AllInstances方法代码示例

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


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

示例1: ExportSenses

		private static XElement ExportSenses(IRepository<ILexSense> senseRepos, Icu.UNormalizationMode mode)
		{
			return new XElement("Senses",
				from sense in senseRepos.AllInstances()
				select new XElement("LexSense",
					new XAttribute("Id", sense.Hvo),
					CreateAttribute("Msa", sense.MorphoSyntaxAnalysisRA),
					ExportBestAnalysis(sense.Gloss, "Gloss", mode),
					ExportBestAnalysis(sense.Definition, "Definition", mode)));
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:10,代码来源:M3ModelExportServices.cs

示例2: ExportEntries

		private static XElement ExportEntries(IRepository<ILexEntry> entryRepos)
		{
			return new XElement("Entries",
				from entry in entryRepos.AllInstances()
				select new XElement("LexEntry",
					new XAttribute("Id", entry.Hvo),
					new XElement("CitationForm", entry.CitationFormWithAffixType),
					from altForm in entry.AlternateFormsOS
					select ExportItemAsReference(altForm, entry.AlternateFormsOS.IndexOf(altForm), "AlternateForms"),
					new XElement("LexemeForm",
						CreateDstAttribute(entry.LexemeFormOA),
						// Protect against a null LexemeFormOA.  See FWR-3251.
						CreateAttribute("MorphType", entry.LexemeFormOA == null ? null : entry.LexemeFormOA.MorphTypeRA)),
						from sense in entry.AllSenses
						select ExportItemAsReference(sense, "Sense"),
						from msa in entry.MorphoSyntaxAnalysesOC
						select ExportItemAsReference(msa, "MorphoSyntaxAnalysis"),
						from lexEntryRef in entry.VariantEntryRefs
						 select new XElement("LexEntryRef",
							 from componentLexemes in lexEntryRef.ComponentLexemesRS
							 select ExportItemAsReference(componentLexemes, "ComponentLexeme"),
						from lexEntryType in lexEntryRef.VariantEntryTypesRS
							select ExportItemAsReference(lexEntryType, "LexEntryType"))));
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:24,代码来源:M3ModelExportServices.cs

示例3: ExportMorphTypes

		private static XElement ExportMorphTypes(IRepository<IMoMorphType> morphTypeRepository, Icu.UNormalizationMode mode)
		{
			return new XElement("MoMorphTypes",
				from morphType in morphTypeRepository.AllInstances()
				select new XElement("MoMorphType",
					new XAttribute("Id", morphType.Hvo),
					new XAttribute("Guid", morphType.Guid.ToString()),
					ExportBestAnalysis(morphType.Name, "Name", mode),
					ExportBestAnalysis(morphType.Abbreviation, "Abbreviation", mode),
					ExportBestAnalysis(morphType.Description, "Description", mode),
					new XElement("NumberOfLexEntries", morphType.NumberOfLexEntries)));
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:12,代码来源:M3ModelExportServices.cs

示例4: ExportLexEntryInflTypes

		private static XElement ExportLexEntryInflTypes(IRepository<ILexEntryInflType> irregularlyInflectedFormTypeRepository, Icu.UNormalizationMode mode)
		{
			return new XElement("LexEntryInflTypes",
								from irregularlyInflectedForm in irregularlyInflectedFormTypeRepository.AllInstances()
								select new XElement("LexEntryInflType",
													new XAttribute("Id", irregularlyInflectedForm.Hvo),
													new XAttribute("Guid", irregularlyInflectedForm.Guid.ToString()),
													ExportBestAnalysis(irregularlyInflectedForm.Name, "Name", mode),
													ExportBestAnalysis(irregularlyInflectedForm.Abbreviation, "Abbreviation",
																	   mode),
													ExportBestAnalysis(irregularlyInflectedForm.Description, "Description", mode),
													ExportBestAnalysis(irregularlyInflectedForm.GlossPrepend, "GlossPrepend", mode),
													ExportBestAnalysis(irregularlyInflectedForm.GlossAppend, "GlossAppend", mode),
													from slot in irregularlyInflectedForm.SlotsRC
													select ExportItemAsReference(slot, "Slots"),
													new XElement("InflectionFeatures",
																 ExportFeatureStructure(irregularlyInflectedForm.InflFeatsOA))));
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:18,代码来源:M3ModelExportServices.cs

示例5: ExportCompoundRules

		private static XElement ExportCompoundRules(IRepository<IMoEndoCompound> endoCmpRepository, IRepository<IMoExoCompound> exoCmpRepository,
			Icu.UNormalizationMode mode)
		{
			return new XElement("CompoundRules",
				from endoCompound in endoCmpRepository.AllInstances()
				where !endoCompound.Disabled
				select new XElement("MoEndoCompound",
					new XAttribute("Id", endoCompound.Hvo),
					new XAttribute("HeadLast", endoCompound.HeadLast ? 1 : 0),
					ExportBestAnalysis(endoCompound.Name, "Name", mode),
					ExportBestAnalysis(endoCompound.Description, "Description", mode),
					ExportItemAsReference(endoCompound.LeftMsaOA, "LeftMsa"),
					ExportItemAsReference(endoCompound.RightMsaOA, "RightMsa"),
					from prod in endoCompound.ToProdRestrictRC
					select ExportItemAsReference(prod, "ToProdRestrict"),
					ExportItemAsReference(endoCompound.OverridingMsaOA, "OverridingMsa")),
				from exoCompound in exoCmpRepository.AllInstances()
				where !exoCompound.Disabled
				select new XElement("MoExoCompound",
					new XAttribute("Id", exoCompound.Hvo),
					ExportBestAnalysis(exoCompound.Name, "Name", mode),
					ExportBestAnalysis(exoCompound.Description, "Description", mode),
					ExportItemAsReference(exoCompound.LeftMsaOA, "LeftMsa"),
					ExportItemAsReference(exoCompound.RightMsaOA, "RightMsa"),
					from prod in exoCompound.ToProdRestrictRC
					select ExportItemAsReference(prod, "ToProdRestrict"),
					ExportItemAsReference(exoCompound.ToMsaOA, "ToMsa")));
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:28,代码来源:M3ModelExportServices.cs


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