Example #1
0
        /// <summary>
        /// Clones the project item.
        /// </summary>
        /// <returns>The clone of the project item.</returns>
        public override ProjectItem Clone()
        {
            FolderItem clone = new FolderItem();

            clone.Description = this.Description;
            clone.Parent      = this.Parent;
            clone.children    = new List <ProjectItem>();

            lock (this.ChildrenLock)
            {
                if (this.Children != null && this.Children.Count > 0)
                {
                    foreach (ProjectItem projectItem in this.Children)
                    {
                        clone.AddChild(projectItem.Clone());
                    }
                }
            }

            return(clone);
        }