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

◆ ReadAsync()

override async Task< bool > System.Xml.XmlSubtreeReader.ReadAsync ( )
inlinevirtual

Reimplemented from System.Xml.XmlReader.

Definition at line 1377 of file XmlSubtreeReader.cs.

1378 {
1379 switch (_state)
1380 {
1381 case State.Initial:
1382 _useCurNode = false;
1383 _state = State.Interactive;
1385 return true;
1386 case State.Interactive:
1387 _curNsAttr = -1;
1388 _useCurNode = false;
1390 if (reader.Depth == _initialDepth && (reader.NodeType == XmlNodeType.EndElement || (reader.NodeType == XmlNodeType.Element && reader.IsEmptyElement)))
1391 {
1392 _state = State.EndOfFile;
1393 SetEmptyNode();
1394 return false;
1395 }
1396 if (await reader.ReadAsync().ConfigureAwait(continueOnCapturedContext: false))
1397 {
1399 return true;
1400 }
1401 SetEmptyNode();
1402 return false;
1403 case State.Error:
1404 case State.EndOfFile:
1405 case State.Closed:
1406 return false;
1407 case State.PopNamespaceScope:
1409 goto case State.ClearNsAttributes;
1410 case State.ClearNsAttributes:
1411 _nsAttrCount = 0;
1412 _state = State.Interactive;
1413 goto case State.Interactive;
1414 case State.ReadElementContentAsBase64:
1415 case State.ReadElementContentAsBinHex:
1417 {
1418 return false;
1419 }
1420 return await ReadAsync().ConfigureAwait(continueOnCapturedContext: false);
1421 case State.ReadContentAsBase64:
1422 case State.ReadContentAsBinHex:
1424 {
1425 return false;
1426 }
1427 return await ReadAsync().ConfigureAwait(continueOnCapturedContext: false);
1428 default:
1429 return false;
1430 }
1431 }
virtual Task< bool > ReadAsync()
XmlNodeType NodeType
Definition XmlReader.cs:62
override async Task< bool > ReadAsync()
readonly XmlNamespaceManager _nsManager
async Task< bool > FinishReadContentAsBinaryAsync()
async Task< bool > FinishReadElementContentAsBinaryAsync()

References System.Xml.XmlSubtreeReader._curNsAttr, System.Xml.XmlSubtreeReader._initialDepth, System.Xml.XmlSubtreeReader._nsAttrCount, System.Xml.XmlSubtreeReader._nsManager, System.Xml.XmlSubtreeReader._state, System.Xml.XmlSubtreeReader._useCurNode, System.Xml.XmlReader.Depth, System.Xml.XmlSubtreeReader.FinishReadContentAsBinaryAsync(), System.Xml.XmlSubtreeReader.FinishReadElementContentAsBinaryAsync(), System.Xml.XmlReader.IsEmptyElement, System.Xml.XmlReader.MoveToElement(), System.Xml.XmlReader.NodeType, System.Xml.XmlNamespaceManager.PopScope(), System.Xml.XmlSubtreeReader.ProcessNamespaces(), System.Xml.XmlReader.ReadAsync(), System.Xml.XmlSubtreeReader.ReadAsync(), System.Xml.XmlWrappingReader.reader, and System.Xml.XmlSubtreeReader.SetEmptyNode().

Referenced by System.Xml.XmlSubtreeReader.FinishReadElementContentAsBinaryAsync(), System.Xml.XmlSubtreeReader.InitReadElementContentAsBinaryAsync(), System.Xml.XmlSubtreeReader.ReadAsync(), System.Xml.XmlSubtreeReader.ReadElementContentAsBase64Async(), System.Xml.XmlSubtreeReader.ReadElementContentAsBinHexAsync(), and System.Xml.XmlSubtreeReader.SkipAsync().