/// <summary> /// Creates a deep copy of this <see cref="EntryPoint"/> instance. /// </summary> /// <returns>The new copy of the <see cref="EntryPoint"/>.</returns> public EntryPoint Clone() { var newEntryPoint = new EntryPoint { UnknownAttributes = UnknownAttributes, UnknownElements = UnknownElements, IfZeroInstallVersion = IfZeroInstallVersion, Command = Command, BinaryName = BinaryName, NeedsTerminal = NeedsTerminal }; newEntryPoint.Names.AddRange(Names.CloneElements()); newEntryPoint.Summaries.AddRange(Summaries.CloneElements()); newEntryPoint.Descriptions.AddRange(Descriptions.CloneElements()); newEntryPoint.Icons.AddRange(Icons); return(newEntryPoint); }
//--------------------// #region Clone /// <summary> /// Creates a deep copy of this <see cref="Feed"/> instance. /// </summary> /// <returns>The new copy of the <see cref="Feed"/>.</returns> public Feed Clone() { var feed = new Feed { UnknownAttributes = UnknownAttributes, UnknownElements = UnknownElements, MinInjectorVersion = MinInjectorVersion, Uri = Uri, Name = Name, Homepage = Homepage, NeedsTerminal = NeedsTerminal }; feed.Feeds.AddRange(Feeds.CloneElements()); feed.FeedFor.AddRange(FeedFor.CloneElements()); feed.Summaries.AddRange(Summaries.CloneElements()); feed.Descriptions.AddRange(Descriptions.CloneElements()); feed.Categories.AddRange(Categories); feed.Icons.AddRange(Icons); feed.Elements.AddRange(Elements.CloneElements()); feed.EntryPoints.AddRange(EntryPoints.CloneElements()); feed.CapabilityLists.AddRange(CapabilityLists.CloneElements()); return(feed); }