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

◆ ReadContentAsFloat()

override float System.Xml.XsdValidatingReader.ReadContentAsFloat ( )
inlinevirtual

Reimplemented from System.Xml.XmlReader.

Definition at line 619 of file XsdValidatingReader.cs.

620 {
621 if (!XmlReader.CanReadContentAs(NodeType))
622 {
623 throw CreateReadContentAsException("ReadContentAsFloat");
624 }
626 XmlSchemaType xmlSchemaType = ((NodeType == XmlNodeType.Attribute) ? AttributeXmlType : ElementXmlType);
627 try
628 {
629 return xmlSchemaType?.ValueConverter.ToSingle(value) ?? XmlUntypedConverter.Untyped.ToSingle(value);
630 }
631 catch (InvalidCastException innerException)
632 {
634 }
635 catch (FormatException innerException2)
636 {
638 }
639 catch (OverflowException innerException3)
640 {
642 }
643 }
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.