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

◆ ReadContentAsBinHexAsync()

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

Reimplemented from System.Xml.XmlReader.

Definition at line 1665 of file XmlSubtreeReader.cs.

1666 {
1667 switch (_state)
1668 {
1669 case State.Initial:
1670 case State.Error:
1671 case State.EndOfFile:
1672 case State.Closed:
1673 return 0;
1674 case State.PopNamespaceScope:
1675 case State.ClearNsAttributes:
1676 switch (NodeType)
1677 {
1678 case XmlNodeType.Element:
1679 throw CreateReadContentAsException("ReadContentAsBinHex");
1680 case XmlNodeType.EndElement:
1681 return 0;
1682 case XmlNodeType.Attribute:
1684 {
1686 if (count == 0)
1687 {
1688 return 0;
1689 }
1690 if (_nsIncReadOffset == 0)
1691 {
1692 if (_binDecoder != null && _binDecoder is BinHexDecoder)
1693 {
1695 }
1696 else
1697 {
1698 _binDecoder = new BinHexDecoder();
1699 }
1700 }
1701 if (_nsIncReadOffset == _curNode.value.Length)
1702 {
1703 return 0;
1704 }
1708 }
1709 goto case XmlNodeType.Text;
1710 case XmlNodeType.Text:
1712 default:
1713 return 0;
1714 }
1715 case State.Interactive:
1716 _state = State.ReadContentAsBinHex;
1717 goto case State.ReadContentAsBinHex;
1718 case State.ReadContentAsBinHex:
1719 {
1721 if (num == 0)
1722 {
1723 _state = State.Interactive;
1725 }
1726 return num;
1727 }
1728 case State.ReadElementContentAsBase64:
1729 case State.ReadElementContentAsBinHex:
1730 case State.ReadContentAsBase64:
1732 default:
1733 return 0;
1734 }
1735 }
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)
virtual Task< int > ReadContentAsBinHexAsync(byte[] buffer, int index, int count)
Exception CreateReadContentAsException(string methodName)
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.ReadContentAsBinHexAsync(), System.Xml.XmlWrappingReader.reader, System.Xml.IncrementalReadDecoder.Reset(), System.Xml.IncrementalReadDecoder.SetNextOutputBuffer(), System.Xml.XmlSubtreeReader.NodeData.value, and System.SR.Xml_MixingBinaryContentMethods.