本文整理汇总了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();
}
示例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));
}