private PropNodeCollectionIntInterface ClonePropNodes(PropNodeCollectionIntInterface sourcePNC, BagNode targetParent) { PropNodeCollectionIntInterface result; List <PropNode> newPropNodeColl = new List <PropNode>(); foreach (PropNode propNode in sourcePNC.GetPropNodes()) { PropNode newPropNode = propNode.CloneForNewParent(targetParent, useExistingValues: true); newPropNodeColl.Add(newPropNode); } if (sourcePNC.IsFixed) { System.Diagnostics.Debug.Assert(!sourcePNC.PropItemSetKey.IsEmpty, "We found a fixed PropSetCollection that has an empty PropItemSetKey."); // Create a Fixed PropNodeCollection. result = new PropNodeCollectionFixed(newPropNodeColl, sourcePNC.PropItemSetKey, sourcePNC.MaxPropsPerObject); } else { // Create an open PropNodeCollection. result = new PropNodeCollection(newPropNodeColl, sourcePNC.PropItemSetKey, sourcePNC.MaxPropsPerObject); } return(result); }
public void Add(PropNodeCollectionIntInterface sourcePropNodes) { Add(sourcePropNodes.GetPropNodes()); }
public PropNodeCollectionShared(PropNodeCollectionIntInterface sourcePropNodes) : this(sourcePropNodes.GetPropNodes(), sourcePropNodes.PropItemSetKey, sourcePropNodes.MaxPropsPerObject) { }
public PropNodeCollectionFixed(PropNodeCollectionIntInterface sourcePropNodes, PropItemSetKeyType propItemSetKey) : this(sourcePropNodes.GetPropNodes(), propItemSetKey, sourcePropNodes.MaxPropsPerObject) { }