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


C# NeoDatis.GetName方法代码示例

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


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

示例1: Match

			public bool Match(NeoDatis.Odb.Test.VO.Human.Animal @object)
			{
				return @object.GetName().StartsWith("my ");
			}
开发者ID:ekicyou,项目名称:pasta,代码行数:4,代码来源:TestPolyMorphic.cs

示例2: Match

		public virtual bool Match(NeoDatis.Odb.Test.VO.School.Student @object)
		{
			return @object.GetName().Equals(name);
		}
开发者ID:ekicyou,项目名称:pasta,代码行数:4,代码来源:SchoolSimpleNativeQueryStudent.cs

示例3: Match

			public bool Match(NeoDatis.Odb.Test.VO.Login.Function function)
			{
				return function.GetName().Equals("function 5");
			}
开发者ID:ekicyou,项目名称:pasta,代码行数:4,代码来源:TestNQQuery2.cs

示例4: ComputeKey

		/// <summary>Take the fields of the index and take value from the query</summary>
		/// <param name="ci">The class info involved</param>
		/// <param name="index">The index</param>
		/// <param name="query"></param>
		/// <returns>The key of the index</returns>
		public static NeoDatis.Tool.Wrappers.OdbComparable ComputeKey(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo
			 ci, NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfoIndex index, NeoDatis.Odb.Impl.Core.Query.Criteria.CriteriaQuery
			 query)
		{
			string[] attributesNames = ci.GetAttributeNames(index.GetAttributeIds());
			NeoDatis.Odb.Core.Layers.Layer2.Meta.AttributeValuesMap values = query.GetCriteria
				().GetValues();
			return BuildIndexKey(index.GetName(), values, attributesNames);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:14,代码来源:IndexTool.cs

示例5: WriteClassAttributeInfo

		/// <summary>Writes a class attribute info, an attribute of a class</summary>
		/// <param name="cai"></param>
		/// <param name="writeInTransaction"></param>
		/// <></>
		private void WriteClassAttributeInfo(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassAttributeInfo
			 cai, bool writeInTransaction)
		{
			fsi.WriteInt(cai.GetId(), writeInTransaction, "attribute id");
			fsi.WriteBoolean(cai.IsNative(), writeInTransaction);
			if (cai.IsNative())
			{
				fsi.WriteInt(cai.GetAttributeType().GetId(), writeInTransaction, "att odb type id"
					);
				if (cai.GetAttributeType().IsArray())
				{
					fsi.WriteInt(cai.GetAttributeType().GetSubType().GetId(), writeInTransaction, "att array sub type"
						);
					// when the attribute is not native, then write its class info
					// position
					if (cai.GetAttributeType().GetSubType().IsNonNative())
					{
						fsi.WriteLong(storageEngine.GetSession(true).GetMetaModel().GetClassInfo(cai.GetAttributeType
							().GetSubType().GetName(), true).GetId().GetObjectId(), writeInTransaction, "class info id of array subtype"
							, NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction.DataWriteAction);
					}
				}
				// For enum, we write the class info id of the enum class
				if (cai.GetAttributeType().IsEnum())
				{
					fsi.WriteLong(storageEngine.GetSession(true).GetMetaModel().GetClassInfo(cai.GetFullClassname
						(), true).GetId().GetObjectId(), writeInTransaction, "class info id", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction
						.DataWriteAction);
				}
			}
			else
			{
				fsi.WriteLong(storageEngine.GetSession(true).GetMetaModel().GetClassInfo(cai.GetFullClassname
					(), true).GetId().GetObjectId(), writeInTransaction, "class info id", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction
					.DataWriteAction);
			}
			fsi.WriteString(cai.GetName(), false, writeInTransaction);
			fsi.WriteBoolean(cai.IsIndex(), writeInTransaction);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:43,代码来源:AbstractObjectWriter.cs

示例6: Get

		public static NeoDatis.Odb.Core.Query.Criteria.ICriterion Get(string attributeName
			, NeoDatis.Odb.Core.Query.Criteria.Operator @operator, string value)
		{
			if (@operator == NeoDatis.Odb.Core.Query.Criteria.Operator.Equal)
			{
				return new NeoDatis.Odb.Impl.Core.Query.Criteria.EqualCriterion(attributeName, value
					);
			}
			if (@operator == NeoDatis.Odb.Core.Query.Criteria.Operator.Like)
			{
				return new NeoDatis.Odb.Impl.Core.Query.Criteria.LikeCriterion(attributeName, value
					, true);
			}
			if (@operator == NeoDatis.Odb.Core.Query.Criteria.Operator.GreaterOrEqual)
			{
				return new NeoDatis.Odb.Core.Query.Criteria.ComparisonCriterion(attributeName, value
					, NeoDatis.Odb.Core.Query.Criteria.ComparisonCriterion.ComparisonTypeGe);
			}
			if (@operator == NeoDatis.Odb.Core.Query.Criteria.Operator.GreaterThan)
			{
				return new NeoDatis.Odb.Core.Query.Criteria.ComparisonCriterion(attributeName, value
					, NeoDatis.Odb.Core.Query.Criteria.ComparisonCriterion.ComparisonTypeGt);
			}
			if (@operator == NeoDatis.Odb.Core.Query.Criteria.Operator.LessThan)
			{
				return new NeoDatis.Odb.Core.Query.Criteria.ComparisonCriterion(attributeName, value
					, NeoDatis.Odb.Core.Query.Criteria.ComparisonCriterion.ComparisonTypeLt);
			}
			if (@operator == NeoDatis.Odb.Core.Query.Criteria.Operator.LessOrEqual)
			{
				return new NeoDatis.Odb.Core.Query.Criteria.ComparisonCriterion(attributeName, value
					, NeoDatis.Odb.Core.Query.Criteria.ComparisonCriterion.ComparisonTypeLe);
			}
			if (@operator == NeoDatis.Odb.Core.Query.Criteria.Operator.Contain)
			{
				return new NeoDatis.Odb.Impl.Core.Query.Criteria.ContainsCriterion(attributeName, 
					value);
			}
			throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.QueryUnknownOperator
				.AddParameter(@operator.GetName()));
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:41,代码来源:Where.cs


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