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

◆ ReadElementContentAsFloat() [1/2]

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

Reimplemented from System.Xml.XmlReader.

Definition at line 876 of file XsdValidatingReader.cs.

877 {
878 if (NodeType != XmlNodeType.Element)
879 {
880 throw CreateReadElementContentAsException("ReadElementContentAsFloat");
881 }
882 XmlSchemaType xmlType;
884 try
885 {
886 return xmlType?.ValueConverter.ToSingle(value) ?? XmlUntypedConverter.Untyped.ToSingle(value);
887 }
888 catch (FormatException innerException)
889 {
891 }
892 catch (InvalidCastException innerException2)
893 {
895 }
896 catch (OverflowException innerException3)
897 {
899 }
900 }
static string Xml_ReadContentAsFormatException
Definition SR.cs:190
Definition SR.cs:7
static readonly XmlValueConverter Untyped
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.ToSingle(), System.Xml.Schema.XmlUntypedConverter.Untyped, System.value, System.Xml.Schema.XmlSchemaType.ValueConverter, System.SR.Xml_ReadContentAsFormatException, and System.Xml.XmlException.