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

◆ ReadPartialBinaryText()

void System.Xml.XmlBinaryReader.ReadPartialBinaryText ( bool withEndElement,
int length )
inlineprivate

Definition at line 1092 of file XmlBinaryReader.cs.

1093 {
1094 int num = Math.Max(_maxBytesPerRead - 5, 0);
1095 if (length <= num)
1096 {
1097 if (withEndElement)
1098 {
1099 ReadText(MoveToAtomicTextWithEndElement(), ValueHandleType.Base64, length);
1100 }
1101 else
1102 {
1103 ReadText(MoveToComplexText(), ValueHandleType.Base64, length);
1104 }
1105 return;
1106 }
1107 int num2 = num;
1108 if (num2 > 3)
1109 {
1110 num2 -= num2 % 3;
1111 }
1112 ReadText(MoveToComplexText(), ValueHandleType.Base64, num2);
1113 XmlBinaryNodeType nodeType = (withEndElement ? XmlBinaryNodeType.Bytes32TextWithEndElement : XmlBinaryNodeType.Bytes32Text);
1114 InsertNode(nodeType, length - num2);
1115 }
XmlComplexTextNode MoveToComplexText()
void InsertNode(XmlBinaryNodeType nodeType, int length)
void ReadText(XmlTextNode textNode, ValueHandleType type, int length)
XmlAtomicTextNode MoveToAtomicTextWithEndElement()

References System.Xml.XmlBinaryReader._maxBytesPerRead, System.Xml.Dictionary, System.Xml.XmlBinaryReader.InsertNode(), System.length, System.Math.Max(), System.Xml.XmlBinaryReader.MoveToAtomicTextWithEndElement(), System.Xml.XmlBaseReader.MoveToComplexText(), and System.Xml.XmlBinaryReader.ReadText().

Referenced by System.Xml.XmlBinaryReader.ReadNode().