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

◆ ParseText() [1/2]

bool System.Xml.XmlTextReaderImpl.ParseText ( )
inlineprivate

Definition at line 5125 of file XmlTextReaderImpl.cs.

5126 {
5127 int outOrChars = 0;
5128 int startPos;
5129 int endPos;
5130 if (_parsingMode != 0)
5131 {
5132 while (!ParseText(out startPos, out endPos, ref outOrChars))
5133 {
5134 }
5135 }
5136 else
5137 {
5139 if (ParseText(out startPos, out endPos, ref outOrChars))
5140 {
5141 if (endPos - startPos != 0)
5142 {
5143 XmlNodeType textNodeType = GetTextNodeType(outOrChars);
5144 if (textNodeType != 0)
5145 {
5147 return true;
5148 }
5149 }
5150 }
5151 else if (_v1Compat)
5152 {
5153 do
5154 {
5155 if (endPos - startPos > 0)
5156 {
5158 }
5159 }
5160 while (!ParseText(out startPos, out endPos, ref outOrChars));
5161 if (endPos - startPos > 0)
5162 {
5164 }
5165 XmlNodeType textNodeType2 = GetTextNodeType(outOrChars);
5166 if (textNodeType2 != 0)
5167 {
5170 return true;
5171 }
5173 }
5174 else
5175 {
5176 bool flag = false;
5177 if (outOrChars > 32)
5178 {
5179 _curNode.SetValueNode(XmlNodeType.Text, _ps.chars, startPos, endPos - startPos);
5181 _parsingFunction = ParsingFunction.PartialTextValue;
5182 return true;
5183 }
5184 if (endPos - startPos > 0)
5185 {
5187 }
5188 do
5189 {
5190 flag = ParseText(out startPos, out endPos, ref outOrChars);
5191 if (endPos - startPos > 0)
5192 {
5194 }
5195 }
5196 while (!flag && outOrChars <= 32 && _stringBuilder.Length < 4096);
5197 XmlNodeType xmlNodeType = ((_stringBuilder.Length < 4096) ? GetTextNodeType(outOrChars) : XmlNodeType.Text);
5198 if (xmlNodeType != 0)
5199 {
5202 if (!flag)
5203 {
5205 _parsingFunction = ParsingFunction.PartialTextValue;
5206 }
5207 return true;
5208 }
5210 if (!flag)
5211 {
5212 while (!ParseText(out startPos, out endPos, ref outOrChars))
5213 {
5214 }
5215 }
5216 }
5217 }
5218 if (_parsingFunction == ParsingFunction.ReportEndEntity)
5219 {
5222 return true;
5223 }
5224 if (_parsingFunction == ParsingFunction.EntityReference)
5225 {
5228 return true;
5229 }
5230 return false;
5231 }
override string ToString()
StringBuilder Append(char value, int repeatCount)
void SetLineInfo(int lineNo, int linePos)
void SetValueNode(XmlNodeType type, string value)
readonly StringBuilder _stringBuilder
XmlNodeType GetTextNodeType(int orChars)

References System.Xml.XmlTextReaderImpl._curNode, System.Xml.XmlTextReaderImpl._nextNextParsingFunction, System.Xml.XmlTextReaderImpl._nextParsingFunction, System.Xml.XmlTextReaderImpl._parsingFunction, System.Xml.XmlTextReaderImpl._parsingMode, System.Xml.XmlTextReaderImpl._ps, System.Xml.XmlTextReaderImpl._stringBuilder, System.Xml.XmlTextReaderImpl._v1Compat, System.Text.StringBuilder.Append(), System.Xml.XmlTextReaderImpl.ParsingState.chars, System.Xml.Dictionary, System.Xml.XmlTextReaderImpl.GetTextNodeType(), System.Text.StringBuilder.Length, System.Xml.XmlTextReaderImpl.ParsingState.LineNo, System.Xml.XmlTextReaderImpl.ParsingState.LinePos, System.Xml.XmlTextReaderImpl.ParseEntityReference(), System.Xml.XmlTextReaderImpl.ParseText(), System.Xml.XmlTextReaderImpl.NodeData.SetLineInfo(), System.Xml.XmlTextReaderImpl.SetupEndEntityNodeInContent(), System.Xml.XmlTextReaderImpl.NodeData.SetValueNode(), and System.Text.StringBuilder.ToString().

Referenced by System.Xml.XmlTextReaderImpl.FinishPartialValue(), System.Xml.XmlTextReaderImpl.ParseDocumentContent(), System.Xml.XmlTextReaderImpl.ParseElementContent(), System.Xml.XmlTextReaderImpl.ParseText(), System.Xml.XmlTextReaderImpl.ReadContentAsBinary(), System.Xml.XmlTextReaderImpl.ReadValueChunk(), and System.Xml.XmlTextReaderImpl.SkipPartialTextValue().