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

◆ _ParseTextAsync()

async Task< bool > System.Xml.XmlTextReaderImpl._ParseTextAsync ( Task<(int, int, int, bool)> parseTask)
inlineprivate

Definition at line 10944 of file XmlTextReaderImpl.cs.

10945 {
10946 int outOrChars = 0;
10947 if (parseTask == null)
10948 {
10949 if (_parsingMode != 0)
10950 {
10951 (int, int, int, bool) tuple;
10952 do
10953 {
10955 _ = tuple.Item1;
10956 _ = tuple.Item2;
10957 outOrChars = tuple.Item3;
10958 }
10959 while (!tuple.Item4);
10960 goto IL_0574;
10961 }
10963 parseTask = ParseTextAsync(outOrChars).AsTask();
10964 }
10966 int num;
10967 int num2;
10968 (num, num2, outOrChars, _) = tuple2;
10969 if (tuple2.Item4)
10970 {
10971 if (num2 - num != 0)
10972 {
10973 XmlNodeType textNodeType = GetTextNodeType(outOrChars);
10974 if (textNodeType != 0)
10975 {
10977 return true;
10978 }
10979 }
10980 }
10981 else if (_v1Compat)
10982 {
10983 (int, int, int, bool) tuple4;
10984 do
10985 {
10986 if (num2 - num > 0)
10987 {
10988 _stringBuilder.Append(_ps.chars, num, num2 - num);
10989 }
10991 (num, num2, outOrChars, _) = tuple4;
10992 }
10993 while (!tuple4.Item4);
10994 if (num2 - num > 0)
10995 {
10996 _stringBuilder.Append(_ps.chars, num, num2 - num);
10997 }
10998 XmlNodeType textNodeType2 = GetTextNodeType(outOrChars);
10999 if (textNodeType2 != 0)
11000 {
11003 return true;
11004 }
11006 }
11007 else
11008 {
11009 if (outOrChars > 32)
11010 {
11011 _curNode.SetValueNode(XmlNodeType.Text, _ps.chars, num, num2 - num);
11013 _parsingFunction = ParsingFunction.PartialTextValue;
11014 return true;
11015 }
11016 if (num2 - num > 0)
11017 {
11018 _stringBuilder.Append(_ps.chars, num, num2 - num);
11019 }
11020 bool flag;
11021 do
11022 {
11023 (num, num2, outOrChars, flag) = await ParseTextAsync(outOrChars).ConfigureAwait(continueOnCapturedContext: false);
11024 if (num2 - num > 0)
11025 {
11026 _stringBuilder.Append(_ps.chars, num, num2 - num);
11027 }
11028 }
11029 while (!flag && outOrChars <= 32 && _stringBuilder.Length < 4096);
11030 XmlNodeType xmlNodeType = ((_stringBuilder.Length < 4096) ? GetTextNodeType(outOrChars) : XmlNodeType.Text);
11031 if (xmlNodeType != 0)
11032 {
11035 if (!flag)
11036 {
11038 _parsingFunction = ParsingFunction.PartialTextValue;
11039 }
11040 return true;
11041 }
11043 if (!flag)
11044 {
11045 (int, int, int, bool) tuple7;
11046 do
11047 {
11049 _ = tuple7.Item1;
11050 _ = tuple7.Item2;
11051 outOrChars = tuple7.Item3;
11052 }
11053 while (!tuple7.Item4);
11054 }
11055 }
11056 goto IL_0574;
11057 IL_0574:
11059 }
override string ToString()
StringBuilder Append(char value, int repeatCount)
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
Definition Task.cs:226
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._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.Threading.Tasks.Task< TResult >.ConfigureAwait(), System.Xml.Dictionary, System.Xml.XmlTextReaderImpl.GetTextNodeType(), System.Xml.XmlTextReaderImpl.int, System.Text.StringBuilder.Length, System.Xml.XmlTextReaderImpl.ParsingState.LineNo, System.Xml.XmlTextReaderImpl.ParsingState.LinePos, System.Xml.XmlTextReaderImpl.ParseTextAsync(), System.Xml.XmlTextReaderImpl.ParseTextAsync_IgnoreNode(), System.Xml.XmlTextReaderImpl.NodeData.SetLineInfo(), System.Xml.XmlTextReaderImpl.NodeData.SetValueNode(), and System.Text.StringBuilder.ToString().

Referenced by System.Xml.XmlTextReaderImpl.ParseTextAsync().