Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="clonedSource"></param>
        /// <returns></returns>
        protected virtual ReferenceSource Clone(ReferenceSource clonedSource)
        {
            if (clonedSource == null)
            {
                clonedSource = (ReferenceSource)this.MemberwiseClone();
            }

            if (_title != null)
            {
                clonedSource._title = String.Copy(_title);
            }

            if (_commentContent != null)
            {
                clonedSource._commentContent = _commentContent.Clone();
            }
            if (_tocContent != null)
            {
                clonedSource._tocContent = _tocContent.Clone();
            }
            if (_typeFilters != null)
            {
                clonedSource._typeFilters = (ReferenceRootFilter)_typeFilters.Clone();
            }
            if (_attributeFilters != null)
            {
                clonedSource._attributeFilters = (ReferenceRootFilter)_attributeFilters.Clone();
            }

            return(clonedSource);
        }
Esempio n. 2
0
        public override ReferenceContent Clone()
        {
            ReferenceContent content = new ReferenceContent(this);

            this.Clone(content);

            if (_contentId != null)
            {
                content._contentId = String.Copy(_contentId);
            }
            if (_contentVersion != null)
            {
                content._contentVersion = (Version)_contentVersion.Clone();
            }
            if (_contentFile != null)
            {
                content._contentFile = _contentFile.Clone();
            }
            if (_contentDir != null)
            {
                content._contentDir = _contentDir.Clone();
            }
            if (_commentContent != null)
            {
                content._commentContent = _commentContent.Clone();
            }
            if (_dependencies != null)
            {
                content._dependencies = _dependencies.Clone();
            }
            if (_tocContent != null)
            {
                content._tocContent = _tocContent.Clone();
            }
            if (_typeFilters != null)
            {
                content._typeFilters = (ReferenceRootFilter)_typeFilters.Clone();
            }
            if (_attributeFilters != null)
            {
                content._attributeFilters = (ReferenceRootFilter)_attributeFilters.Clone();
            }

            return(content);
        }