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

◆ ReadContentAsLong()

virtual long System.Xml.XmlReader.ReadContentAsLong ( )
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 270 of file XmlReader.cs.

271 {
272 if (!CanReadContentAs())
273 {
274 throw CreateReadContentAsException("ReadContentAsLong");
275 }
276 try
277 {
278 return XmlConvert.ToInt64(InternalReadContentAsString());
279 }
280 catch (FormatException innerException)
281 {
282 throw new XmlException(System.SR.Xml_ReadContentAsFormatException, "Long", innerException, this as IXmlLineInfo);
283 }
284 }
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.ToInt64(), System.SR.Xml_ReadContentAsFormatException, and System.Xml.XmlException.

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