/// <summary> /// Merge action is simply copying the new input control /// </summary> /// <param name="newAc"></param> public void Merge(ActionCls newAc) { this.InputList.Clear( ); foreach (ActionCommandCls acc in newAc.InputList) { this.InputList.Add(acc); } }
} // regular bind is the 0-element, addbinds are added to the list /// <summary> /// Clone this object /// </summary> /// <returns>A deep Clone of this object</returns> private ActionCls MyClone() { ActionCls newAc = (ActionCls)this.MemberwiseClone( ); // more objects to deep copy newAc.DefActivationMode = (ActivationMode)this.DefActivationMode.Clone( ); newAc.InputList = this.InputList.Select(x => (ActionCommandCls)x.Clone( )).ToList( ); return(newAc); }
/// <summary> /// Copy return the action while reassigning the JsN Tag /// </summary> /// <param name="newJsList">The JsN reassign list</param> /// <returns>The action copy with reassigned input</returns> public ActionCls ReassignJsN(JsReassingList newJsList) { ActionCls newAc = this.MyClone( ); // creates a copy of the list with reassigned jsN devs newAc.InputList.Clear( ); // get rid of cloned list foreach (ActionCommandCls acc in InputList) { newAc.InputList.Add(acc.ReassignJsN(newJsList)); // creates the deep copy of the list } return(newAc); }