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

◆ ReadContentAsDouble()

override double System.Xml.XsdValidatingReader.ReadContentAsDouble ( )
inlinevirtual

Reimplemented from System.Xml.XmlReader.

Definition at line 593 of file XsdValidatingReader.cs.

594 {
595 if (!XmlReader.CanReadContentAs(NodeType))
596 {
597 throw CreateReadContentAsException("ReadContentAsDouble");
598 }
600 XmlSchemaType xmlSchemaType = ((NodeType == XmlNodeType.Attribute) ? AttributeXmlType : ElementXmlType);
601 try
602 {
603 return xmlSchemaType?.ValueConverter.ToDouble(value) ?? XmlUntypedConverter.Untyped.ToDouble(value);
604 }
605 catch (InvalidCastException innerException)
606 {
608 }
609 catch (FormatException innerException2)
610 {
612 }
613 catch (OverflowException innerException3)
614 {
616 }
617 }
static string Xml_ReadContentAsFormatException
Definition SR.cs:190
Definition SR.cs:7
static readonly XmlValueConverter Untyped
Exception CreateReadContentAsException(string methodName)

References System.Xml.XsdValidatingReader.AttributeXmlType, System.Xml.XmlReader.CanReadContentAs(), System.Xml.XmlReader.CreateReadContentAsException(), System.Xml.XsdValidatingReader.ElementXmlType, System.Xml.XsdValidatingReader.InternalReadContentAsObject(), System.Xml.XsdValidatingReader.NodeType, System.Xml.Schema.XmlUntypedConverter.Untyped, System.value, System.SR.Xml_ReadContentAsFormatException, and System.Xml.XmlException.