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

◆ FinishReadElementContentAsBinary()

bool System.Xml.XmlSubtreeReader.FinishReadElementContentAsBinary ( )
inlineprivate

Definition at line 1241 of file XmlSubtreeReader.cs.

1242 {
1243 byte[] buffer = new byte[256];
1244 if (_state == State.ReadElementContentAsBase64)
1245 {
1246 while (reader.ReadContentAsBase64(buffer, 0, 256) > 0)
1247 {
1248 }
1249 }
1250 else
1251 {
1252 while (reader.ReadContentAsBinHex(buffer, 0, 256) > 0)
1253 {
1254 }
1255 }
1256 if (NodeType != XmlNodeType.EndElement)
1257 {
1258 throw new XmlException(System.SR.Xml_InvalidNodeType, reader.NodeType.ToString(), reader as IXmlLineInfo);
1259 }
1260 _state = State.Interactive;
1262 if (reader.Depth == _initialDepth)
1263 {
1264 _state = State.EndOfFile;
1265 SetEmptyNode();
1266 return false;
1267 }
1268 return Read();
1269 }
static string Xml_InvalidNodeType
Definition SR.cs:88
Definition SR.cs:7
virtual int ReadContentAsBinHex(byte[] buffer, int index, int count)
Definition XmlReader.cs:554
virtual int ReadContentAsBase64(byte[] buffer, int index, int count)
Definition XmlReader.cs:544
XmlNodeType NodeType
Definition XmlReader.cs:62
override XmlNodeType NodeType

References System.Xml.XmlSubtreeReader._initialDepth, System.Xml.XmlSubtreeReader._state, System.buffer, System.Xml.XmlReader.Depth, System.Xml.XmlReader.NodeType, System.Xml.XmlSubtreeReader.NodeType, System.Xml.XmlSubtreeReader.ProcessNamespaces(), System.Xml.XmlSubtreeReader.Read(), System.Xml.XmlReader.ReadContentAsBase64(), System.Xml.XmlReader.ReadContentAsBinHex(), System.Xml.XmlWrappingReader.reader, System.Xml.XmlSubtreeReader.SetEmptyNode(), System.SR.Xml_InvalidNodeType, and System.Xml.XmlException.

Referenced by System.Xml.XmlSubtreeReader.Read(), and System.Xml.XmlSubtreeReader.Skip().