/// <summary> /// Clone the item /// </summary> /// <returns></returns> public object Clone() { ShoppingCartItem retVal = this.MemberwiseClone() as ShoppingCartItem; //clone the xml XmlNode[] nodes = new XmlNode[this.MerchantPrivateItemDataNodes.Length]; for (int i = 0; i < nodes.Length; i++) { nodes[i] = MerchantPrivateItemDataNodes[i].Clone(); } retVal.MerchantPrivateItemDataNodes = nodes; //clone the digital item if (DigitalContent != null) { retVal.DigitalContent = DigitalContent.Clone() as DigitalItem; } if (Subscription != null) { retVal.Subscription = Subscription.Clone() as Subscription; } return(retVal); }
protected override void SaveData() { OriginalSettings = EditedSettings.Clone <MediaScheduleSettings, MediaScheduleSettings>(); OriginalSettings.UpdateDictionaries(); Schedule.ApplySettingsChanges(ChangeInfo); if (ChangeInfo.DigitalContentChanged) { Schedule.DigitalProductsContent = DigitalContent.Clone <DigitalProductsContent, DigitalProductsContent>(); } }