/// <summary> /// Copy return the complete ActionMap while reassigning the JsN Tag /// </summary> /// <param name="newJsList">The JsN reassign list</param> /// <returns>The ActionMap copy with reassigned input</returns> public ActionMapCls ReassignJsN(JsReassingList newJsList) { var newMap = new ActionMapCls(this); foreach (ActionCls ac in this) { newMap.Add(ac.ReassignJsN(newJsList)); // creates the deep copy of the tree } return(newMap); }
/// <summary> /// Copy return the complete ActionMap while reassigning the JsN Tag /// </summary> /// <param name="newJsList">The JsN reassign list</param> /// <returns>The ActionMap copy with reassigned input</returns> public ActionMapCls ReassignJsN(JsReassingList newJsList) { ActionMapCls newMap = new ActionMapCls( ); // full copy from 'this' newMap.name = this.name; foreach (ActionCls ac in this) { newMap.Add(ac.ReassignJsN(newJsList)); } return(newMap); }
/// <summary> /// Merge the given Map with this Map /// new ones are ignored - we don't learn from XML input for the time beeing /// </summary> /// <param name="newAcm"></param> public void Merge(ActionMapCls newAcm) { // do we find all actions in the new list that are like the new ones in our list ? foreach (ActionCls newAc in newAcm) { ActionCls AC = this.Find(delegate(ActionCls ac) { return(ac.key == newAc.key); }); if (AC == null) { ; // this.Add( newAc ); // no, add it } else { AC.Merge(newAc); // yes, merge it } } }
private ActionMapCls(ActionMapCls other) { this.name = other.name; // no deep copy of refs }