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

◆ ReadContentAsInt()

virtual int System.Xml.XmlReader.ReadContentAsInt ( )
inlinevirtualinherited

Reimplemented in System.Runtime.Serialization.Json.XmlJsonReader, System.Runtime.Serialization.XmlSerializableReader, System.Xml.XmlBaseReader, System.Xml.XmlDictionaryReader.XmlWrappedReader, System.Xml.XmlAsyncCheckReader, System.Xml.XmlSqlBinaryReader, System.Xml.XmlSubtreeReader, and System.Xml.XsdValidatingReader.

Definition at line 254 of file XmlReader.cs.

255 {
256 if (!CanReadContentAs())
257 {
258 throw CreateReadContentAsException("ReadContentAsInt");
259 }
260 try
261 {
262 return XmlConvert.ToInt32(InternalReadContentAsString());
263 }
264 catch (FormatException innerException)
265 {
266 throw new XmlException(System.SR.Xml_ReadContentAsFormatException, "Int", innerException, this as IXmlLineInfo);
267 }
268 }
static string Xml_ReadContentAsFormatException
Definition SR.cs:190
Definition SR.cs:7
Exception CreateReadContentAsException(string methodName)
string InternalReadContentAsString()

References System.Xml.XmlReader.CanReadContentAs(), System.Xml.XmlReader.CreateReadContentAsException(), System.Xml.Dictionary, System.Xml.XmlReader.InternalReadContentAsString(), System.Xml.XmlConvert.ToInt32(), System.SR.Xml_ReadContentAsFormatException, and System.Xml.XmlException.

Referenced by System.Runtime.Serialization.XmlReaderDelegator.ReadContentAsInt(), System.Runtime.Serialization.XmlSerializableReader.ReadContentAsInt(), System.Xml.XmlDictionaryReader.XmlWrappedReader.ReadContentAsInt(), System.Xml.XmlAsyncCheckReader.ReadContentAsInt(), System.Xml.XmlSubtreeReader.ReadContentAsInt(), System.Xml.XmlDictionaryReader.ReadElementContentAsInt(), System.Xml.XmlReader.ReadElementContentAsInt(), and System.Xml.XmlBinaryWriter.WriteTextNode().