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

◆ ReadContentAsDecimal()

override decimal System.Xml.XsdValidatingReader.ReadContentAsDecimal ( )
inlinevirtual

Reimplemented from System.Xml.XmlReader.

Definition at line 645 of file XsdValidatingReader.cs.

646 {
647 if (!XmlReader.CanReadContentAs(NodeType))
648 {
649 throw CreateReadContentAsException("ReadContentAsDecimal");
650 }
652 XmlSchemaType xmlSchemaType = ((NodeType == XmlNodeType.Attribute) ? AttributeXmlType : ElementXmlType);
653 try
654 {
655 return xmlSchemaType?.ValueConverter.ToDecimal(value) ?? XmlUntypedConverter.Untyped.ToDecimal(value);
656 }
657 catch (InvalidCastException innerException)
658 {
660 }
661 catch (FormatException innerException2)
662 {
664 }
665 catch (OverflowException innerException3)
666 {
668 }
669 }
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.