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

◆ ReadContentAsDecimal()

virtual decimal System.Xml.XmlReader.ReadContentAsDecimal ( )
inlinevirtualinherited

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

Definition at line 238 of file XmlReader.cs.

239 {
240 if (!CanReadContentAs())
241 {
242 throw CreateReadContentAsException("ReadContentAsDecimal");
243 }
244 try
245 {
246 return XmlConvert.ToDecimal(InternalReadContentAsString());
247 }
248 catch (FormatException innerException)
249 {
250 throw new XmlException(System.SR.Xml_ReadContentAsFormatException, "Decimal", innerException, this as IXmlLineInfo);
251 }
252 }
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.ToDecimal(), System.SR.Xml_ReadContentAsFormatException, and System.Xml.XmlException.

Referenced by System.Runtime.Serialization.XmlReaderDelegator.ReadContentAsDecimal(), System.Xml.XmlAsyncCheckReader.ReadContentAsDecimal(), System.Xml.XmlSubtreeReader.ReadContentAsDecimal(), and System.Xml.XmlReader.ReadElementContentAsDecimal().