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

            if (this.Document != null && this.Node != null)
            {
                MainContentProcessor mcp = new MainContentProcessor(this.Document);
                eventListenersClone = mcp.CreateEventListeners(this.Node.CloneNode(true));
            }

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

            if (Document != null && Node != null)
            {
                MainContentProcessor mcp = new MainContentProcessor(Document);
                eventListenersClone = mcp.CreateEventListeners(new XElement(Node));
            }

            return(eventListenersClone);
        }