public virtual object BuildOneInstance(NativeObjectInfo objectInfo) { if (objectInfo.IsAtomicNativeObject()) { return(BuildOneInstance((AtomicNativeObjectInfo)objectInfo)); } if (objectInfo.IsCollectionObject()) { CollectionObjectInfo coi = (CollectionObjectInfo)objectInfo; object value = BuildCollectionInstance(coi); /* Manage a specific case of Set * if (typeof(Java.Util.Set).IsAssignableFrom(value.GetType()) && typeof(System.Collections.ICollection).IsAssignableFrom(value.GetType())) * { * Java.Util.Set s = new Java.Util.HashSet(); * s.AddAll((System.Collections.ICollection)value); * value = s; * } */ return(value); } if (objectInfo.IsArrayObject()) { return(BuildArrayInstance((ArrayObjectInfo)objectInfo)); } if (objectInfo.IsMapObject()) { return(BuildMapInstance((MapObjectInfo)objectInfo)); } if (objectInfo.IsNull()) { return(null); } throw new ODBRuntimeException(NeoDatisError.InstanceBuilderNativeType.AddParameter(ODBType.GetNameFromId(objectInfo.GetOdbTypeId()))); }
private static bool HasChanged(NativeObjectInfo aoi1, NativeObjectInfo aoi2) { if (aoi1.GetObject() == null && aoi2.GetObject() == null) return false; if (aoi1.GetObject() == null || aoi2.GetObject() == null) return true; return !aoi1.GetObject().Equals(aoi2.GetObject()); }
private static bool HasChanged(NativeObjectInfo aoi1, NativeObjectInfo aoi2) { if (aoi1.GetObject() == null && aoi2.GetObject() == null) { return(false); } if (aoi1.GetObject() == null || aoi2.GetObject() == null) { return(true); } return(!aoi1.GetObject().Equals(aoi2.GetObject())); }
private bool HasChanged(NativeObjectInfo aoi1 , NativeObjectInfo aoi2, int objectRecursionLevel ) { if (aoi1.GetObject() == null && aoi2.GetObject() == null) { return(false); } if (aoi1.GetObject() == null || aoi2.GetObject() == null) { return(true); } return(!aoi1.GetObject().Equals(aoi2.GetObject())); }
private object BuildOneInstance(NativeObjectInfo objectInfo) { if (objectInfo.IsAtomicNativeObject()) { return(BuildOneInstance((AtomicNativeObjectInfo)objectInfo)); } if (objectInfo.IsArrayObject()) { return(BuildArrayInstance((ArrayObjectInfo)objectInfo)); } if (objectInfo.IsNull()) { return(null); } throw new OdbRuntimeException( NDatabaseError.InstanceBuilderNativeType.AddParameter(OdbType.GetNameFromId(objectInfo.GetOdbTypeId()))); }