Esempio n. 1
0
        /// <summary>
        /// Create a deep clone of this Bookmark object.
        /// </summary>
        /// <remarks>A possible Attached Style wouldn't be cloned!</remarks>
        /// <returns>
        /// A clone of this object.
        /// </returns>
        public object Clone()
        {
            Bookmark bookmarkClone = null;

            if (this.Document != null && this.Node != null)
            {
                TextContentProcessor tcp = new TextContentProcessor();
                bookmarkClone = tcp.CreateBookmark(
                    this.Document, this.Node.CloneNode(true), this.BookmarkType);
            }

            return(bookmarkClone);
        }
Esempio n. 2
0
        /// <summary>
        /// Create a deep clone of this Bookmark object.
        /// </summary>
        /// <remarks>A possible Attached Style wouldn't be cloned!</remarks>
        /// <returns>
        /// A clone of this object.
        /// </returns>
        public object Clone()
        {
            Bookmark bookmarkClone = null;

            if (Document != null && Node != null)
            {
                TextContentProcessor tcp = new TextContentProcessor();
                bookmarkClone = tcp.CreateBookmark(
                    Document, new XElement(Node), BookmarkType);
            }

            return(bookmarkClone);
        }