Exemple #1
0
        /// <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);
        }
Exemple #2
0
 /// <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
         }
     }
 }
Exemple #3
0
 private ActionMapCls(ActionMapCls other)
 {
     this.MapName = other.MapName;
     // no deep copy of refs
 }