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

◆ ReadContentAsBase64()

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

Reimplemented from System.Xml.XmlReader.

Definition at line 771 of file XmlSubtreeReader.cs.

772 {
773 switch (_state)
774 {
775 case State.Initial:
776 case State.Error:
777 case State.EndOfFile:
778 case State.Closed:
779 return 0;
780 case State.PopNamespaceScope:
781 case State.ClearNsAttributes:
782 switch (NodeType)
783 {
784 case XmlNodeType.Element:
785 throw CreateReadContentAsException("ReadContentAsBase64");
786 case XmlNodeType.EndElement:
787 return 0;
788 case XmlNodeType.Attribute:
790 {
792 if (count == 0)
793 {
794 return 0;
795 }
796 if (_nsIncReadOffset == 0)
797 {
798 if (_binDecoder != null && _binDecoder is Base64Decoder)
799 {
801 }
802 else
803 {
804 _binDecoder = new Base64Decoder();
805 }
806 }
807 if (_nsIncReadOffset == _curNode.value.Length)
808 {
809 return 0;
810 }
814 }
815 goto case XmlNodeType.Text;
816 case XmlNodeType.Text:
818 default:
819 return 0;
820 }
821 case State.Interactive:
822 _state = State.ReadContentAsBase64;
823 goto case State.ReadContentAsBase64;
824 case State.ReadContentAsBase64:
825 {
827 if (num == 0)
828 {
829 _state = State.Interactive;
831 }
832 return num;
833 }
834 case State.ReadElementContentAsBase64:
835 case State.ReadElementContentAsBinHex:
836 case State.ReadContentAsBinHex:
838 default:
839 return 0;
840 }
841 }
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)
Exception CreateReadContentAsException(string methodName)
virtual int ReadContentAsBase64(byte[] buffer, int index, int count)
Definition XmlReader.cs:544
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.ReadContentAsBase64(), System.Xml.XmlWrappingReader.reader, System.Xml.IncrementalReadDecoder.Reset(), System.Xml.IncrementalReadDecoder.SetNextOutputBuffer(), System.Xml.XmlSubtreeReader.NodeData.value, and System.SR.Xml_MixingBinaryContentMethods.