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

◆ ReadElementContentAsDecimal() [1/2]

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

Reimplemented from System.Xml.XmlReader.

Definition at line 902 of file XsdValidatingReader.cs.

903 {
904 if (NodeType != XmlNodeType.Element)
905 {
906 throw CreateReadElementContentAsException("ReadElementContentAsDecimal");
907 }
908 XmlSchemaType xmlType;
910 try
911 {
912 return xmlType?.ValueConverter.ToDecimal(value) ?? XmlUntypedConverter.Untyped.ToDecimal(value);
913 }
914 catch (FormatException innerException)
915 {
917 }
918 catch (InvalidCastException innerException2)
919 {
921 }
922 catch (OverflowException innerException3)
923 {
925 }
926 }
static string Xml_ReadContentAsFormatException
Definition SR.cs:190
Definition SR.cs:7
static readonly XmlValueConverter Untyped
decimal ToDecimal(string value)
Exception CreateReadElementContentAsException(string methodName)
object InternalReadElementContentAsObject(out XmlSchemaType xmlType)

References System.Xml.XmlReader.CreateReadElementContentAsException(), System.Xml.XsdValidatingReader.InternalReadElementContentAsObject(), System.Xml.XsdValidatingReader.NodeType, System.Xml.Schema.XmlValueConverter.ToDecimal(), System.Xml.Schema.XmlUntypedConverter.Untyped, System.value, System.Xml.Schema.XmlSchemaType.ValueConverter, System.SR.Xml_ReadContentAsFormatException, and System.Xml.XmlException.