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

◆ GetString() [2/3]

byte[] System.Xml.StringHandle.GetString ( out int offset,
out int length )
inline

Definition at line 126 of file StringHandle.cs.

127 {
128 switch (_type)
129 {
130 case StringHandleType.UTF8:
131 offset = _offset;
132 length = _length;
133 return _bufferReader.Buffer;
134 case StringHandleType.Dictionary:
135 {
137 offset = 0;
138 length = array3.Length;
139 return array3;
140 }
141 case StringHandleType.ConstString:
142 {
143 byte[] array2 = XmlConverter.ToBytes(s_constStrings[_key]);
144 offset = 0;
145 length = array2.Length;
146 return array2;
147 }
148 default:
149 {
150 byte[] array = XmlConverter.ToBytes(_bufferReader.GetEscapedString(_offset, _length));
151 offset = 0;
152 length = array.Length;
153 return array;
154 }
155 }
156 }
StringHandleType _type
static readonly string[] s_constStrings
readonly XmlBufferReader _bufferReader
XmlDictionaryString GetDictionaryString(int key)
string GetEscapedString(int offset, int length)

References System.Xml.StringHandle._bufferReader, System.Xml.StringHandle._key, System.Xml.StringHandle._length, System.Xml.StringHandle._offset, System.Xml.StringHandle._type, System.array, System.Xml.XmlBufferReader.Buffer, System.Xml.StringHandle.Dictionary, System.Xml.XmlBufferReader.GetDictionaryString(), System.Xml.XmlBufferReader.GetEscapedString(), System.length, System.offset, System.Xml.StringHandle.s_constStrings, System.Xml.XmlConverter.ToBytes(), and System.Xml.XmlDictionaryString.ToUTF8().