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

◆ ScanQNameAsync() [2/2]

async Task System.Xml.DtdParser.ScanQNameAsync ( bool isQName)
inlineprivate

Definition at line 5290 of file DtdParser.cs.

5291 {
5293 int colonOffset = -1;
5294 while (true)
5295 {
5296 if (XmlCharType.IsStartNCNameSingleChar(_chars[_curPos]) || _chars[_curPos] == ':')
5297 {
5298 _curPos++;
5299 }
5300 else if (_curPos + 1 >= _charsUsed)
5301 {
5303 {
5304 continue;
5305 }
5307 }
5308 else
5309 {
5311 }
5312 while (true)
5313 {
5314 if (XmlCharType.IsNCNameSingleChar(_chars[_curPos]))
5315 {
5316 _curPos++;
5317 continue;
5318 }
5319 if (_chars[_curPos] == ':')
5320 {
5321 if (isQName)
5322 {
5323 break;
5324 }
5325 _curPos++;
5326 continue;
5327 }
5328 if (_curPos == _charsUsed)
5329 {
5331 {
5332 continue;
5333 }
5334 if (_tokenStartPos == _curPos)
5335 {
5337 }
5338 }
5339 _colonPos = ((colonOffset == -1) ? (-1) : (_tokenStartPos + colonOffset));
5340 return;
5341 }
5342 if (colonOffset != -1)
5343 {
5344 Throw(_curPos, System.SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0'));
5345 }
5347 _curPos++;
5348 }
5349 }
static string Xml_BadStartNameChar
Definition SR.cs:42
static string Xml_BadNameChar
Definition SR.cs:44
static string Xml_UnexpectedEOF
Definition SR.cs:36
Definition SR.cs:7
void Throw(int curPos, string res)
async Task< bool > ReadDataInNameAsync()

References System.Xml.DtdParser._chars, System.Xml.DtdParser._charsUsed, System.Xml.DtdParser._colonPos, System.Xml.DtdParser._curPos, System.Xml.DtdParser._tokenStartPos, System.Xml.XmlException.BuildCharExceptionArgs(), System.Xml.Dictionary, System.Xml.XmlCharType.IsNCNameSingleChar(), System.Xml.XmlCharType.IsStartNCNameSingleChar(), System.Xml.DtdParser.ReadDataInNameAsync(), System.Xml.DtdParser.Throw(), System.SR.Xml_BadNameChar, System.SR.Xml_BadStartNameChar, and System.SR.Xml_UnexpectedEOF.