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

◆ ReadElementContentAsBinHexAsync()

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

Reimplemented from System.Xml.XmlReader.

Definition at line 1737 of file XmlSubtreeReader.cs.

1738 {
1739 switch (_state)
1740 {
1741 case State.Initial:
1742 case State.Error:
1743 case State.EndOfFile:
1744 case State.Closed:
1745 return 0;
1746 case State.Interactive:
1747 case State.PopNamespaceScope:
1748 case State.ClearNsAttributes:
1749 if (!(await InitReadElementContentAsBinaryAsync(State.ReadElementContentAsBinHex).ConfigureAwait(continueOnCapturedContext: false)))
1750 {
1751 return 0;
1752 }
1753 goto case State.ReadElementContentAsBinHex;
1754 case State.ReadElementContentAsBinHex:
1755 {
1757 if (num > 0 || count == 0)
1758 {
1759 return num;
1760 }
1761 if (NodeType != XmlNodeType.EndElement)
1762 {
1763 throw new XmlException(System.SR.Xml_InvalidNodeType, reader.NodeType.ToString(), reader as IXmlLineInfo);
1764 }
1765 _state = State.Interactive;
1767 if (reader.Depth != _initialDepth)
1768 {
1770 }
1771 else
1772 {
1773 _state = State.EndOfFile;
1774 SetEmptyNode();
1775 }
1776 return 0;
1777 }
1778 case State.ReadElementContentAsBase64:
1779 case State.ReadContentAsBase64:
1780 case State.ReadContentAsBinHex:
1782 default:
1783 return 0;
1784 }
1785 }
static string Xml_InvalidNodeType
Definition SR.cs:88
static string Xml_MixingBinaryContentMethods
Definition SR.cs:184
Definition SR.cs:7
virtual Task< int > ReadContentAsBinHexAsync(byte[] buffer, int index, int count)
XmlNodeType NodeType
Definition XmlReader.cs:62
override async Task< bool > ReadAsync()
async Task< bool > InitReadElementContentAsBinaryAsync(State binaryState)
override XmlNodeType NodeType

References System.Xml.XmlSubtreeReader._initialDepth, System.Xml.XmlSubtreeReader._state, System.buffer, System.count, System.Xml.XmlReader.Depth, System.index, System.Xml.XmlSubtreeReader.InitReadElementContentAsBinaryAsync(), System.Xml.XmlReader.NodeType, System.Xml.XmlSubtreeReader.NodeType, System.Xml.XmlSubtreeReader.ProcessNamespaces(), System.Xml.XmlSubtreeReader.ReadAsync(), System.Xml.XmlReader.ReadContentAsBinHexAsync(), System.Xml.XmlWrappingReader.reader, System.Xml.XmlSubtreeReader.SetEmptyNode(), System.SR.Xml_InvalidNodeType, System.SR.Xml_MixingBinaryContentMethods, and System.Xml.XmlException.