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

◆ ValueAsDouble()

double System.Xml.XmlSqlBinaryReader.ValueAsDouble ( )
inlineprivate

Definition at line 3493 of file XmlSqlBinaryReader.cs.

3494 {
3496 switch (_token)
3497 {
3498 case BinXmlToken.SQL_SMALLINT:
3499 case BinXmlToken.SQL_INT:
3500 case BinXmlToken.SQL_BIT:
3501 case BinXmlToken.SQL_TINYINT:
3502 case BinXmlToken.SQL_BIGINT:
3503 case BinXmlToken.XSD_BYTE:
3504 case BinXmlToken.XSD_UNSIGNEDSHORT:
3505 case BinXmlToken.XSD_UNSIGNEDINT:
3506 return ValueAsLong();
3507 case BinXmlToken.XSD_UNSIGNEDLONG:
3508 return ValueAsULong();
3509 case BinXmlToken.SQL_REAL:
3510 return GetSingle(_tokDataPos);
3511 case BinXmlToken.SQL_FLOAT:
3512 return GetDouble(_tokDataPos);
3513 case BinXmlToken.SQL_MONEY:
3514 case BinXmlToken.SQL_DECIMAL:
3515 case BinXmlToken.SQL_NUMERIC:
3516 case BinXmlToken.SQL_SMALLMONEY:
3517 case BinXmlToken.XSD_DECIMAL:
3518 return (double)ValueAsDecimal();
3519 default:
3521 }
3522 }
Exception ThrowUnexpectedToken(BinXmlToken token)

References System.Xml.XmlSqlBinaryReader._tokDataPos, System.Xml.XmlSqlBinaryReader._token, System.Xml.XmlSqlBinaryReader.CheckValueTokenBounds(), System.Xml.XmlSqlBinaryReader.GetDouble(), System.Xml.XmlSqlBinaryReader.GetSingle(), System.Xml.XmlSqlBinaryReader.ThrowUnexpectedToken(), System.Xml.XmlSqlBinaryReader.ValueAsDecimal(), System.Xml.XmlSqlBinaryReader.ValueAsLong(), and System.Xml.XmlSqlBinaryReader.ValueAsULong().

Referenced by System.Xml.XmlSqlBinaryReader.ReadContentAsDouble(), System.Xml.XmlSqlBinaryReader.ReadContentAsFloat(), and System.Xml.XmlSqlBinaryReader.ValueAsLong().