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

◆ ReadElementContentAsBase64()

override int System.Xml.XmlSubtreeReader.ReadElementContentAsBase64 ( byte[] buffer,
int index,
int count )
inlinevirtual

Reimplemented from System.Xml.XmlReader.

Definition at line 843 of file XmlSubtreeReader.cs.

844 {
845 switch (_state)
846 {
847 case State.Initial:
848 case State.Error:
849 case State.EndOfFile:
850 case State.Closed:
851 return 0;
852 case State.Interactive:
853 case State.PopNamespaceScope:
854 case State.ClearNsAttributes:
855 if (!InitReadElementContentAsBinary(State.ReadElementContentAsBase64))
856 {
857 return 0;
858 }
859 goto case State.ReadElementContentAsBase64;
860 case State.ReadElementContentAsBase64:
861 {
863 if (num > 0 || count == 0)
864 {
865 return num;
866 }
867 if (NodeType != XmlNodeType.EndElement)
868 {
869 throw new XmlException(System.SR.Xml_InvalidNodeType, reader.NodeType.ToString(), reader as IXmlLineInfo);
870 }
871 _state = State.Interactive;
874 {
875 _state = State.EndOfFile;
876 SetEmptyNode();
877 }
878 else
879 {
880 Read();
881 }
882 return 0;
883 }
884 case State.ReadElementContentAsBinHex:
885 case State.ReadContentAsBase64:
886 case State.ReadContentAsBinHex:
888 default:
889 return 0;
890 }
891 }
static string Xml_InvalidNodeType
Definition SR.cs:88
static string Xml_MixingBinaryContentMethods
Definition SR.cs:184
Definition SR.cs:7
virtual int ReadContentAsBase64(byte[] buffer, int index, int count)
Definition XmlReader.cs:544
XmlNodeType NodeType
Definition XmlReader.cs:62
bool InitReadElementContentAsBinary(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.InitReadElementContentAsBinary(), System.Xml.XmlReader.NodeType, System.Xml.XmlSubtreeReader.NodeType, System.Xml.XmlSubtreeReader.ProcessNamespaces(), System.Xml.XmlSubtreeReader.Read(), System.Xml.XmlReader.ReadContentAsBase64(), System.Xml.XmlWrappingReader.reader, System.Xml.XmlSubtreeReader.SetEmptyNode(), System.SR.Xml_InvalidNodeType, System.SR.Xml_MixingBinaryContentMethods, and System.Xml.XmlException.