public XmlParserTagInfo Clone() { XmlParserTagInfo clone = this.MemberwiseClone() as XmlParserTagInfo; clone.cursor = cursor.Clone(); return(clone); }
public XmlParserTagInfo(XmlParserCursor cursor, string name) { this.cursor = cursor.Clone(); this.Name = name; IsEmptyElement = false; IsElementClosingTag = false; IsBoundaryElement = false; }
/// <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); }