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

◆ ParseElementAsync_NoAttributes()

Task System.Xml.XmlTextReaderImpl.ParseElementAsync_NoAttributes ( )
inlineprivate

Definition at line 10206 of file XmlTextReaderImpl.cs.

10207 {
10208 int charPos = _ps.charPos;
10209 char[] chars = _ps.chars;
10210 switch (chars[charPos])
10211 {
10212 case '>':
10213 _ps.charPos = charPos + 1;
10214 _parsingFunction = ParsingFunction.MoveToElementContent;
10215 break;
10216 case '/':
10217 if (charPos + 1 == _ps.charsUsed)
10218 {
10219 _ps.charPos = charPos;
10220 return ParseElementAsync_ReadData(charPos);
10221 }
10222 if (chars[charPos + 1] == '>')
10223 {
10226 _parsingFunction = ParsingFunction.PopEmptyElementContext;
10227 _ps.charPos = charPos + 2;
10228 }
10229 else
10230 {
10231 ThrowUnexpectedToken(charPos, ">");
10232 }
10233 break;
10234 default:
10235 Throw(charPos, System.SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(chars, _ps.charsUsed, charPos));
10236 break;
10237 }
10239 {
10241 }
10243 return Task.CompletedTask;
10244 }
static string Xml_BadNameChar
Definition SR.cs:44
Definition SR.cs:7
static Task CompletedTask
Definition Task.cs:1120
async Task ParseElementAsync_ReadData(int pos)
void Throw(int pos, string res, string arg)
void ThrowUnexpectedToken(int pos, string expectedToken)

References System.Xml.XmlTextReaderImpl._addDefaultAttributesAndNormalize, System.Xml.XmlTextReaderImpl._nextParsingFunction, System.Xml.XmlTextReaderImpl._parsingFunction, System.Xml.XmlTextReaderImpl._ps, System.Xml.XmlTextReaderImpl.AddDefaultAttributesAndNormalize(), System.Xml.XmlException.BuildCharExceptionArgs(), System.Xml.XmlTextReaderImpl.ParsingState.charPos, System.chars, System.Xml.XmlTextReaderImpl.ParsingState.chars, System.Xml.XmlTextReaderImpl.ParsingState.charsUsed, System.Threading.Tasks.Task< TResult >.CompletedTask, System.Xml.Dictionary, System.Xml.XmlTextReaderImpl.ElementNamespaceLookup(), System.Xml.XmlTextReaderImpl.ParseElementAsync_ReadData(), System.Xml.XmlTextReaderImpl.Throw(), System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(), and System.SR.Xml_BadNameChar.

Referenced by System.Xml.XmlTextReaderImpl.ParseElementAsync_ReadData(), and System.Xml.XmlTextReaderImpl.ParseElementAsync_SetElement().