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

◆ ReadContentAsLong()

override long System.Xml.XmlSqlBinaryReader.ReadContentAsLong ( )
inlinevirtual

Reimplemented from System.Xml.XmlReader.

Definition at line 1509 of file XmlSqlBinaryReader.cs.

1510 {
1511 int num = _pos;
1512 try
1513 {
1514 long result;
1515 if (SetupContentAsXXX("ReadContentAsLong"))
1516 {
1517 try
1518 {
1519 switch (_token)
1520 {
1521 case BinXmlToken.SQL_SMALLINT:
1522 case BinXmlToken.SQL_INT:
1523 case BinXmlToken.SQL_MONEY:
1524 case BinXmlToken.SQL_BIT:
1525 case BinXmlToken.SQL_TINYINT:
1526 case BinXmlToken.SQL_BIGINT:
1527 case BinXmlToken.SQL_DECIMAL:
1528 case BinXmlToken.SQL_NUMERIC:
1529 case BinXmlToken.SQL_SMALLMONEY:
1530 case BinXmlToken.XSD_DECIMAL:
1531 case BinXmlToken.XSD_BYTE:
1532 case BinXmlToken.XSD_UNSIGNEDSHORT:
1533 case BinXmlToken.XSD_UNSIGNEDINT:
1534 case BinXmlToken.XSD_UNSIGNEDLONG:
1535 result = ValueAsLong();
1536 goto IL_016e;
1537 case BinXmlToken.SQL_REAL:
1538 case BinXmlToken.SQL_FLOAT:
1539 case BinXmlToken.SQL_UUID:
1540 case BinXmlToken.SQL_BINARY:
1541 case BinXmlToken.SQL_VARBINARY:
1542 case BinXmlToken.SQL_DATETIME:
1543 case BinXmlToken.SQL_SMALLDATETIME:
1544 case BinXmlToken.SQL_IMAGE:
1545 case BinXmlToken.SQL_UDT:
1546 case BinXmlToken.XSD_KATMAI_TIMEOFFSET:
1547 case BinXmlToken.XSD_KATMAI_DATETIMEOFFSET:
1548 case BinXmlToken.XSD_KATMAI_DATEOFFSET:
1549 case BinXmlToken.XSD_KATMAI_TIME:
1550 case BinXmlToken.XSD_KATMAI_DATETIME:
1551 case BinXmlToken.XSD_KATMAI_DATE:
1552 case BinXmlToken.XSD_TIME:
1553 case BinXmlToken.XSD_DATETIME:
1554 case BinXmlToken.XSD_DATE:
1555 case BinXmlToken.XSD_BINHEX:
1556 case BinXmlToken.XSD_BASE64:
1557 case BinXmlToken.XSD_BOOLEAN:
1558 case BinXmlToken.XSD_QNAME:
1559 throw new InvalidCastException(System.SR.Format(System.SR.XmlBinary_CastNotSupported, _token, "Int64"));
1560 case BinXmlToken.EndElem:
1561 case BinXmlToken.Element:
1562 return XmlConvert.ToInt64(string.Empty);
1563 }
1564 }
1565 catch (InvalidCastException innerException)
1566 {
1568 }
1569 catch (FormatException innerException2)
1570 {
1572 }
1573 catch (OverflowException innerException3)
1574 {
1576 }
1577 }
1578 goto end_IL_0007;
1579 IL_016e:
1580 num = FinishContentAsXXX(num);
1581 return result;
1582 end_IL_0007:;
1583 }
1584 finally
1585 {
1586 _pos = num;
1587 }
1588 return base.ReadContentAsLong();
1589 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Xml_ReadContentAsFormatException
Definition SR.cs:190
static string XmlBinary_CastNotSupported
Definition SR.cs:1382
Definition SR.cs:7

References System.Xml.XmlSqlBinaryReader._pos, System.Xml.XmlSqlBinaryReader._token, System.Xml.Dictionary, System.Xml.XmlSqlBinaryReader.FinishContentAsXXX(), System.SR.Format(), System.Xml.XmlSqlBinaryReader.SetupContentAsXXX(), System.Xml.XmlConvert.ToInt64(), System.Xml.XmlSqlBinaryReader.ValueAsLong(), System.SR.Xml_ReadContentAsFormatException, System.SR.XmlBinary_CastNotSupported, and System.Xml.XmlException.