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

◆ ReadContentAsBinHex()

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

Reimplemented from System.Xml.XmlReader.

Definition at line 893 of file XmlSubtreeReader.cs.

894 {
895 switch (_state)
896 {
897 case State.Initial:
898 case State.Error:
899 case State.EndOfFile:
900 case State.Closed:
901 return 0;
902 case State.PopNamespaceScope:
903 case State.ClearNsAttributes:
904 switch (NodeType)
905 {
906 case XmlNodeType.Element:
907 throw CreateReadContentAsException("ReadContentAsBinHex");
908 case XmlNodeType.EndElement:
909 return 0;
910 case XmlNodeType.Attribute:
912 {
914 if (count == 0)
915 {
916 return 0;
917 }
918 if (_nsIncReadOffset == 0)
919 {
920 if (_binDecoder != null && _binDecoder is BinHexDecoder)
921 {
923 }
924 else
925 {
926 _binDecoder = new BinHexDecoder();
927 }
928 }
929 if (_nsIncReadOffset == _curNode.value.Length)
930 {
931 return 0;
932 }
936 }
937 goto case XmlNodeType.Text;
938 case XmlNodeType.Text:
940 default:
941 return 0;
942 }
943 case State.Interactive:
944 _state = State.ReadContentAsBinHex;
945 goto case State.ReadContentAsBinHex;
946 case State.ReadContentAsBinHex:
947 {
949 if (num == 0)
950 {
951 _state = State.Interactive;
953 }
954 return num;
955 }
956 case State.ReadElementContentAsBase64:
957 case State.ReadElementContentAsBinHex:
958 case State.ReadContentAsBase64:
960 default:
961 return 0;
962 }
963 }
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 ReadContentAsBinHex(byte[] buffer, int index, int count)
Definition XmlReader.cs:554
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.ReadContentAsBinHex(), System.Xml.XmlWrappingReader.reader, System.Xml.IncrementalReadDecoder.Reset(), System.Xml.IncrementalReadDecoder.SetNextOutputBuffer(), System.Xml.XmlSubtreeReader.NodeData.value, and System.SR.Xml_MixingBinaryContentMethods.