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

◆ InitReadElementContentAsBinaryAsync()

async Task< bool > System.Xml.XmlSubtreeReader.InitReadElementContentAsBinaryAsync ( State binaryState)
inlineprivate

Definition at line 1826 of file XmlSubtreeReader.cs.

1827 {
1828 if (NodeType != XmlNodeType.Element)
1829 {
1830 throw reader.CreateReadElementContentAsException("ReadElementContentAsBase64");
1831 }
1832 bool isEmpty = IsEmptyElement;
1833 if (!(await ReadAsync().ConfigureAwait(continueOnCapturedContext: false)) || isEmpty)
1834 {
1835 return false;
1836 }
1837 switch (NodeType)
1838 {
1839 case XmlNodeType.Element:
1840 throw new XmlException(System.SR.Xml_InvalidNodeType, reader.NodeType.ToString(), reader as IXmlLineInfo);
1841 case XmlNodeType.EndElement:
1844 return false;
1845 default:
1847 return true;
1848 }
1849 }
static string Xml_InvalidNodeType
Definition SR.cs:88
Definition SR.cs:7
Exception CreateReadElementContentAsException(string methodName)
XmlNodeType NodeType
Definition XmlReader.cs:62
override async Task< bool > ReadAsync()
override XmlNodeType NodeType

References System.Xml.XmlSubtreeReader._state, System.Xml.XmlReader.CreateReadElementContentAsException(), System.Xml.Dictionary, System.Xml.XmlSubtreeReader.IsEmptyElement, System.Xml.XmlReader.NodeType, System.Xml.XmlSubtreeReader.NodeType, System.Xml.XmlSubtreeReader.ProcessNamespaces(), System.Xml.XmlSubtreeReader.ReadAsync(), System.Xml.XmlWrappingReader.reader, System.SR.Xml_InvalidNodeType, and System.Xml.XmlException.

Referenced by System.Xml.XmlSubtreeReader.ReadElementContentAsBase64Async(), and System.Xml.XmlSubtreeReader.ReadElementContentAsBinHexAsync().