Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ReadToDescendant() [1/2]

virtual bool System.Xml.XmlReader.ReadToDescendant ( string localName,
string namespaceURI )
inlinevirtualinherited

Reimplemented in System.Xml.Linq.XNodeReader, and System.Xml.XmlAsyncCheckReader.

Definition at line 856 of file XmlReader.cs.

857 {
858 if (localName == null || localName.Length == 0)
859 {
860 throw XmlConvert.CreateInvalidNameArgumentException(localName, "localName");
861 }
862 if (namespaceURI == null)
863 {
864 throw new ArgumentNullException("namespaceURI");
865 }
866 int num = Depth;
867 if (NodeType != XmlNodeType.Element)
868 {
869 if (ReadState != 0)
870 {
871 return false;
872 }
873 num--;
874 }
875 else if (IsEmptyElement)
876 {
877 return false;
878 }
879 localName = NameTable.Add(localName);
881 while (Read() && Depth > num)
882 {
883 if (NodeType == XmlNodeType.Element && Ref.Equal(localName, LocalName) && Ref.Equal(namespaceURI, NamespaceURI))
884 {
885 return true;
886 }
887 }
888 return false;
889 }
string Add(char[] array, int offset, int length)
XmlNodeType NodeType
Definition XmlReader.cs:62
XmlNameTable NameTable
Definition XmlReader.cs:116

References System.Xml.NameTable.Add(), System.Xml.XmlConvert.CreateInvalidNameArgumentException(), System.Xml.XmlReader.Depth, System.Xml.Dictionary, System.Xml.Ref.Equal(), System.Xml.XmlReader.IsEmptyElement, System.Xml.XmlReader.LocalName, System.Xml.XmlReader.NamespaceURI, System.Xml.XmlReader.NodeType, and System.Xml.XmlReader.Read().