Exemple #1
0
        //--------------------//

        #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);
        }