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

◆ CheckElement()

void System.Xml.XmlReader.CheckElement ( string localName,
string namespaceURI )
inlinepackageinherited

Definition at line 1164 of file XmlReader.cs.

1165 {
1166 if (localName == null || localName.Length == 0)
1167 {
1168 throw XmlConvert.CreateInvalidNameArgumentException(localName, "localName");
1169 }
1170 if (namespaceURI == null)
1171 {
1172 throw new ArgumentNullException("namespaceURI");
1173 }
1174 if (NodeType != XmlNodeType.Element)
1175 {
1176 throw new XmlException(System.SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
1177 }
1178 if (LocalName != localName || NamespaceURI != namespaceURI)
1179 {
1180 throw new XmlException(System.SR.Xml_ElementNotFoundNs, new string[2] { localName, namespaceURI }, this as IXmlLineInfo);
1181 }
1182 }
static string Xml_ElementNotFoundNs
Definition SR.cs:102
static string Xml_InvalidNodeType
Definition SR.cs:88
Definition SR.cs:7
XmlNodeType NodeType
Definition XmlReader.cs:62

References System.Xml.XmlConvert.CreateInvalidNameArgumentException(), System.Xml.Dictionary, System.Xml.XmlReader.LocalName, System.Xml.XmlReader.NamespaceURI, System.Xml.XmlReader.NodeType, System.SR.Xml_ElementNotFoundNs, System.SR.Xml_InvalidNodeType, and System.Xml.XmlException.

Referenced by System.Xml.XmlReader.ReadElementContentAs(), System.Xml.XmlReader.ReadElementContentAsBoolean(), System.Xml.XmlReader.ReadElementContentAsDateTime(), System.Xml.XmlReader.ReadElementContentAsDecimal(), System.Xml.XmlReader.ReadElementContentAsDouble(), System.Xml.XmlReader.ReadElementContentAsFloat(), System.Xml.XmlReader.ReadElementContentAsInt(), System.Xml.XmlReader.ReadElementContentAsLong(), System.Xml.XmlReader.ReadElementContentAsObject(), and System.Xml.XmlReader.ReadElementContentAsString().