예제 #1
0
        public XmlParserTagInfo Clone()
        {
            XmlParserTagInfo clone = this.MemberwiseClone() as XmlParserTagInfo;

            clone.cursor = cursor.Clone();
            return(clone);
        }
예제 #2
0
 public XmlParserTagInfo(XmlParserCursor cursor, string name)
 {
     this.cursor         = cursor.Clone();
     this.Name           = name;
     IsEmptyElement      = false;
     IsElementClosingTag = false;
     IsBoundaryElement   = false;
 }
예제 #3
0
        /// <summary>
        /// Replicates the tag parser to create a new tag parser with exactly the same state.
        /// Changing either the original tag parser or the clone will not affect the other.
        /// </summary>
        /// <returns>Returns a new XmlTagsParser, initialized to the same data as the
        /// original parser and placed on the same position as the original parser.</returns>
        public XmlTagsParser Clone()
        {
            Validate();

            XmlTagsParser clone = new XmlTagsParser(_xml);

            clone._cursor = _cursor.Clone();
            clone.Cursor  = new ReadOnlyCursor(clone._cursor);
            clone._path   = _path.Clone();
            clone.Current = Current.Clone();
            return(clone);
        }