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

◆ ReadContentAsBase64Async()

override async Task< int > System.Xml.XmlSubtreeReader.ReadContentAsBase64Async ( byte[] buffer,
int index,
int count )
inlinevirtual

Reimplemented from System.Xml.XmlReader.

Definition at line 1543 of file XmlSubtreeReader.cs.

1544 {
1545 switch (_state)
1546 {
1547 case State.Initial:
1548 case State.Error:
1549 case State.EndOfFile:
1550 case State.Closed:
1551 return 0;
1552 case State.PopNamespaceScope:
1553 case State.ClearNsAttributes:
1554 switch (NodeType)
1555 {
1556 case XmlNodeType.Element:
1557 throw CreateReadContentAsException("ReadContentAsBase64");
1558 case XmlNodeType.EndElement:
1559 return 0;
1560 case XmlNodeType.Attribute:
1562 {
1564 if (count == 0)
1565 {
1566 return 0;
1567 }
1568 if (_nsIncReadOffset == 0)
1569 {
1570 if (_binDecoder != null && _binDecoder is Base64Decoder)
1571 {
1573 }
1574 else
1575 {
1576 _binDecoder = new Base64Decoder();
1577 }
1578 }
1579 if (_nsIncReadOffset == _curNode.value.Length)
1580 {
1581 return 0;
1582 }
1586 }
1587 goto case XmlNodeType.Text;
1588 case XmlNodeType.Text:
1590 default:
1591 return 0;
1592 }
1593 case State.Interactive:
1594 _state = State.ReadContentAsBase64;
1595 goto case State.ReadContentAsBase64;
1596 case State.ReadContentAsBase64:
1597 {
1599 if (num == 0)
1600 {
1601 _state = State.Interactive;
1603 }
1604 return num;
1605 }
1606 case State.ReadElementContentAsBase64:
1607 case State.ReadElementContentAsBinHex:
1608 case State.ReadContentAsBinHex:
1610 default:
1611 return 0;
1612 }
1613 }
static string Xml_MixingBinaryContentMethods
Definition SR.cs:184
Definition SR.cs:7
int Decode(char[] chars, int startPos, int len)
void SetNextOutputBuffer(Array array, int offset, int len)
Exception CreateReadContentAsException(string methodName)
virtual Task< int > ReadContentAsBase64Async(byte[] buffer, int index, int count)
virtual bool CanReadBinaryContent
Definition XmlReader.cs:120
IncrementalReadDecoder _binDecoder
void CheckBuffer(Array buffer, int index, int count)
override XmlNodeType NodeType

References System.Xml.XmlSubtreeReader._binDecoder, System.Xml.XmlSubtreeReader._curNode, System.Xml.XmlSubtreeReader._curNsAttr, System.Xml.XmlSubtreeReader._nsIncReadOffset, System.Xml.XmlSubtreeReader._state, System.buffer, System.Xml.XmlReader.CanReadBinaryContent, System.Xml.XmlSubtreeReader.CheckBuffer(), System.count, System.Xml.XmlReader.CreateReadContentAsException(), System.Xml.IncrementalReadDecoder.Decode(), System.Xml.IncrementalReadDecoder.DecodedCount, System.index, System.Xml.XmlSubtreeReader.NodeType, System.Xml.XmlSubtreeReader.ProcessNamespaces(), System.Xml.XmlReader.ReadContentAsBase64Async(), System.Xml.XmlWrappingReader.reader, System.Xml.IncrementalReadDecoder.Reset(), System.Xml.IncrementalReadDecoder.SetNextOutputBuffer(), System.Xml.XmlSubtreeReader.NodeData.value, and System.SR.Xml_MixingBinaryContentMethods.