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


C# NeoDatis.IsNonNativeObject方法代码示例

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


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

示例1: InternalStoreObjectWrapper

		/// <summary>
		/// This method is used to store the object : natibe or non native and return
		/// a number : - The position of the object if it is a native object - The
		/// oid (as a negative number) if it is a non native object
		/// </summary>
		/// <param name="aoi"></param>
		/// <returns></returns>
		/// <exception cref="System.Exception">System.Exception</exception>
		private long InternalStoreObjectWrapper(NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo
			 aoi)
		{
			if (aoi.IsNative())
			{
				return InternalStoreObject((NeoDatis.Odb.Core.Layers.Layer2.Meta.NativeObjectInfo
					)aoi);
			}
			if (aoi.IsNonNativeObject())
			{
				NeoDatis.Odb.OID oid = StoreObject(null, (NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo
					)aoi);
				return -oid.GetObjectId();
			}
			// Object references are references to object already stored.
			// But in the case of map, the reference can appear before the real
			// object (as order may change)
			// If objectReference.getOid() is null, it is the case. In this case,
			// We take the object being referenced and stores it directly.
			NeoDatis.Odb.Core.Layers.Layer2.Meta.ObjectReference objectReference = (NeoDatis.Odb.Core.Layers.Layer2.Meta.ObjectReference
				)aoi;
			if (objectReference.GetOid() == null)
			{
				NeoDatis.Odb.OID oid = StoreObject(null, objectReference.GetNnoi());
				return -oid.GetObjectId();
			}
			return -objectReference.GetOid().GetObjectId();
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:36,代码来源:AbstractObjectWriter.cs

示例2: UpdateObject

		public virtual NeoDatis.Odb.OID UpdateObject(NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo
			 aoi, bool forceUpdate)
		{
			if (aoi.IsNonNativeObject())
			{
				return UpdateNonNativeObjectInfo((NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo
					)aoi, forceUpdate);
			}
			if (aoi.IsNative())
			{
				return UpdateObject(aoi, forceUpdate);
			}
			// TODO : here should use if then else
			throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.AbstractObjectInfoTypeNotSupported
				.AddParameter(aoi.GetType().FullName));
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:16,代码来源:AbstractObjectWriter.cs


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