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

◆ ReadDoc()

bool System.Xml.XmlSqlBinaryReader.ReadDoc ( )
inlineprivate

Definition at line 2649 of file XmlSqlBinaryReader.cs.

2650 {
2651 switch (_nodetype)
2652 {
2653 case XmlNodeType.CDATA:
2654 FinishCDATA();
2655 break;
2656 case XmlNodeType.EndElement:
2658 break;
2659 case XmlNodeType.Element:
2660 if (_isEmpty)
2661 {
2663 _isEmpty = false;
2664 }
2665 break;
2666 }
2667 while (true)
2668 {
2669 _nodetype = XmlNodeType.None;
2670 _mark = -1;
2671 if (_qnameOther.localname.Length != 0)
2672 {
2674 }
2676 _attrCount = 0;
2678 _stringValue = null;
2679 _hasTypedValue = false;
2680 _token = NextToken();
2681 switch (_token)
2682 {
2683 case BinXmlToken.EOF:
2684 if (_elemDepth > 0)
2685 {
2686 throw new XmlException(System.SR.Xml_UnexpectedEOF1, (string[])null);
2687 }
2688 _state = ScanState.EOF;
2689 return false;
2690 case BinXmlToken.Element:
2692 break;
2693 case BinXmlToken.EndElem:
2695 break;
2696 case BinXmlToken.DocType:
2698 if (_dtdProcessing == DtdProcessing.Ignore || _prevNameInfo != null)
2699 {
2700 continue;
2701 }
2702 break;
2703 case BinXmlToken.PI:
2704 ImplReadPI();
2705 if (_ignorePIs)
2706 {
2707 continue;
2708 }
2709 break;
2710 case BinXmlToken.Comment:
2712 if (_ignoreComments)
2713 {
2714 continue;
2715 }
2716 break;
2717 case BinXmlToken.CData:
2718 ImplReadCDATA();
2719 break;
2720 case BinXmlToken.Nest:
2721 ImplReadNest();
2722 _sniffed = false;
2723 return ReadInit(skipXmlDecl: true);
2724 case BinXmlToken.EndNest:
2725 if (_prevNameInfo != null)
2726 {
2728 return ReadDoc();
2729 }
2730 goto default;
2731 case BinXmlToken.XmlText:
2733 break;
2734 case BinXmlToken.SQL_SMALLINT:
2735 case BinXmlToken.SQL_INT:
2736 case BinXmlToken.SQL_REAL:
2737 case BinXmlToken.SQL_FLOAT:
2738 case BinXmlToken.SQL_MONEY:
2739 case BinXmlToken.SQL_BIT:
2740 case BinXmlToken.SQL_TINYINT:
2741 case BinXmlToken.SQL_BIGINT:
2742 case BinXmlToken.SQL_UUID:
2743 case BinXmlToken.SQL_DECIMAL:
2744 case BinXmlToken.SQL_NUMERIC:
2745 case BinXmlToken.SQL_BINARY:
2746 case BinXmlToken.SQL_CHAR:
2747 case BinXmlToken.SQL_NCHAR:
2748 case BinXmlToken.SQL_VARBINARY:
2749 case BinXmlToken.SQL_VARCHAR:
2750 case BinXmlToken.SQL_NVARCHAR:
2751 case BinXmlToken.SQL_DATETIME:
2752 case BinXmlToken.SQL_SMALLDATETIME:
2753 case BinXmlToken.SQL_SMALLMONEY:
2754 case BinXmlToken.SQL_TEXT:
2755 case BinXmlToken.SQL_IMAGE:
2756 case BinXmlToken.SQL_NTEXT:
2757 case BinXmlToken.SQL_UDT:
2758 case BinXmlToken.XSD_KATMAI_TIMEOFFSET:
2759 case BinXmlToken.XSD_KATMAI_DATETIMEOFFSET:
2760 case BinXmlToken.XSD_KATMAI_DATEOFFSET:
2761 case BinXmlToken.XSD_KATMAI_TIME:
2762 case BinXmlToken.XSD_KATMAI_DATETIME:
2763 case BinXmlToken.XSD_KATMAI_DATE:
2764 case BinXmlToken.XSD_TIME:
2765 case BinXmlToken.XSD_DATETIME:
2766 case BinXmlToken.XSD_DATE:
2767 case BinXmlToken.XSD_BINHEX:
2768 case BinXmlToken.XSD_BASE64:
2769 case BinXmlToken.XSD_BOOLEAN:
2770 case BinXmlToken.XSD_DECIMAL:
2771 case BinXmlToken.XSD_BYTE:
2772 case BinXmlToken.XSD_UNSIGNEDSHORT:
2773 case BinXmlToken.XSD_UNSIGNEDINT:
2774 case BinXmlToken.XSD_UNSIGNEDLONG:
2775 case BinXmlToken.XSD_QNAME:
2777 if (XmlNodeType.Text == _nodetype)
2778 {
2780 }
2782 {
2783 continue;
2784 }
2785 return true;
2786 default:
2788 }
2789 break;
2790 }
2791 return true;
2792 }
static string Xml_UnexpectedEOF1
Definition SR.cs:38
Definition SR.cs:7
readonly DtdProcessing _dtdProcessing
void ImplReadData(BinXmlToken tokenType)
Exception ThrowUnexpectedToken(BinXmlToken token)

References System.Xml.XmlSqlBinaryReader._attrCount, System.Xml.XmlSqlBinaryReader._dtdProcessing, System.Xml.XmlSqlBinaryReader._elemDepth, System.Xml.XmlSqlBinaryReader._hasTypedValue, System.Xml.XmlSqlBinaryReader._ignoreComments, System.Xml.XmlSqlBinaryReader._ignorePIs, System.Xml.XmlSqlBinaryReader._ignoreWhitespace, System.Xml.XmlSqlBinaryReader._isEmpty, System.Xml.XmlSqlBinaryReader._mark, System.Xml.XmlSqlBinaryReader._nodetype, System.Xml.XmlSqlBinaryReader._prevNameInfo, System.Xml.XmlSqlBinaryReader._qnameOther, System.Xml.XmlSqlBinaryReader._sniffed, System.Xml.XmlSqlBinaryReader._state, System.Xml.XmlSqlBinaryReader._stringValue, System.Xml.XmlSqlBinaryReader._token, System.Xml.XmlSqlBinaryReader._valueType, System.Xml.XmlSqlBinaryReader._xmlspacePreserve, System.Xml.XmlSqlBinaryReader.CheckAllowContent(), System.Xml.XmlSqlBinaryReader.QName.Clear(), System.Xml.XmlSqlBinaryReader.ClearAttributes(), System.Xml.XmlSqlBinaryReader.FinishCDATA(), System.Xml.XmlSqlBinaryReader.FinishEndElement(), System.Xml.XmlSqlBinaryReader.ImplReadCDATA(), System.Xml.XmlSqlBinaryReader.ImplReadComment(), System.Xml.XmlSqlBinaryReader.ImplReadData(), System.Xml.XmlSqlBinaryReader.ImplReadDoctype(), System.Xml.XmlSqlBinaryReader.ImplReadElement(), System.Xml.XmlSqlBinaryReader.ImplReadEndElement(), System.Xml.XmlSqlBinaryReader.ImplReadEndNest(), System.Xml.XmlSqlBinaryReader.ImplReadNest(), System.Xml.XmlSqlBinaryReader.ImplReadPI(), System.Xml.XmlSqlBinaryReader.ImplReadXmlText(), System.Xml.XmlSqlBinaryReader.QName.localname, System.Xml.XmlSqlBinaryReader.NextToken(), System.Xml.XmlSqlBinaryReader.ReadDoc(), System.Xml.XmlSqlBinaryReader.ReadInit(), System.Xml.XmlSqlBinaryReader.ThrowUnexpectedToken(), System.Xml.XmlSqlBinaryReader.TypeOfString, System.SR.Xml_UnexpectedEOF1, and System.Xml.XmlException.

Referenced by System.Xml.XmlSqlBinaryReader.ImplReadXmlText(), System.Xml.XmlSqlBinaryReader.Read(), System.Xml.XmlSqlBinaryReader.ReadDoc(), and System.Xml.XmlSqlBinaryReader.ReadInit().