public override NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo CreateCopy (System.Collections.Generic.IDictionary <NeoDatis.Odb.OID, NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo > cache, bool onlyData) { System.Collections.ICollection c = (System.Collections.ICollection)theObject; System.Collections.Generic.ICollection <NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo > newCollection = new NeoDatis.Tool.Wrappers.List.OdbArrayList <NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo >(); // To keep track of non native objects NeoDatis.Tool.Wrappers.List.IOdbList <NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo > nonNatives = new NeoDatis.Tool.Wrappers.List.OdbArrayList <NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo >(); System.Collections.IEnumerator iterator = c.GetEnumerator(); while (iterator.MoveNext()) { NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo aoi = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo )iterator.Current; // create copy aoi = aoi.CreateCopy(cache, onlyData); newCollection.Add(aoi); if (aoi.IsNonNativeObject()) { nonNatives.Add((NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo)aoi); } } NeoDatis.Odb.Core.Layers.Layer2.Meta.CollectionObjectInfo coi = new NeoDatis.Odb.Core.Layers.Layer2.Meta.CollectionObjectInfo (newCollection, odbType, nonNatives); coi.SetRealCollectionClassName(realCollectionClassName); return(coi); }
public override AbstractObjectInfo CreateCopy(IDictionary <OID, AbstractObjectInfo> cache, bool onlyData) { IDictionary <AbstractObjectInfo, AbstractObjectInfo> m = GetMap(); IDictionary <AbstractObjectInfo, AbstractObjectInfo> newMap = new OdbHashMap <AbstractObjectInfo, AbstractObjectInfo>(); System.Collections.IEnumerator iterator = m.Keys.GetEnumerator(); while (iterator.MoveNext()) { NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo keyAoi = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo )iterator.Current; NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo valueAoi = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo )m[keyAoi]; // create copies keyAoi = keyAoi.CreateCopy(cache, onlyData); valueAoi = valueAoi.CreateCopy(cache, onlyData); newMap.Add(keyAoi, valueAoi); } MapObjectInfo moi = new MapObjectInfo(newMap, odbType, realMapClassName); return(moi); }
public override NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo CreateCopy (System.Collections.Generic.IDictionary <NeoDatis.Odb.OID, NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo > cache, bool onlyData) { object[] array = GetArray(); int length = array.Length; NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo[] aois = new NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo [length]; for (int i = 0; i < length; i++) { NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo aoi = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo )array[i]; aois[i] = aoi.CreateCopy(cache, onlyData); } NeoDatis.Odb.Core.Layers.Layer2.Meta.ArrayObjectInfo arrayOfAoi = new NeoDatis.Odb.Core.Layers.Layer2.Meta.ArrayObjectInfo (aois); arrayOfAoi.SetRealArrayComponentClassName(realArrayComponentClassName); arrayOfAoi.SetComponentTypeId(componentTypeId); return(arrayOfAoi); }