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

◆ Convert() [4/5]

unsafe override void System.Text.DecoderNLS.Convert ( byte[] bytes,
int byteIndex,
int byteCount,
char[] chars,
int charIndex,
int charCount,
bool flush,
out int bytesUsed,
out int charsUsed,
out bool completed )
inlinevirtualinherited

Reimplemented from System.Text.Decoder.

Definition at line 166 of file DecoderNLS.cs.

167 {
168 if (bytes == null || chars == null)
169 {
170 throw new ArgumentNullException((bytes == null) ? "bytes" : "chars", System.SR.ArgumentNull_Array);
171 }
172 if (byteIndex < 0 || byteCount < 0)
173 {
174 throw new ArgumentOutOfRangeException((byteIndex < 0) ? "byteIndex" : "byteCount", System.SR.ArgumentOutOfRange_NeedNonNegNum);
175 }
176 if (charIndex < 0 || charCount < 0)
177 {
178 throw new ArgumentOutOfRangeException((charIndex < 0) ? "charIndex" : "charCount", System.SR.ArgumentOutOfRange_NeedNonNegNum);
179 }
180 if (bytes.Length - byteIndex < byteCount)
181 {
182 throw new ArgumentOutOfRangeException("bytes", System.SR.ArgumentOutOfRange_IndexCountBuffer);
183 }
184 if (chars.Length - charIndex < charCount)
185 {
186 throw new ArgumentOutOfRangeException("chars", System.SR.ArgumentOutOfRange_IndexCountBuffer);
187 }
188 if (bytes.Length == 0)
189 {
190 bytes = new byte[1];
191 }
192 if (chars.Length == 0)
193 {
194 chars = new char[1];
195 }
196 fixed (byte* ptr = &bytes[0])
197 {
198 fixed (char* ptr2 = &chars[0])
199 {
200 Convert(ptr + byteIndex, byteCount, ptr2 + charIndex, charCount, flush, out bytesUsed, out charsUsed, out completed);
201 }
202 }
203 }
static string ArgumentOutOfRange_IndexCountBuffer
Definition SR.cs:78
Definition SR.cs:7
unsafe override void Convert(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, int charCount, bool flush, out int bytesUsed, out int charsUsed, out bool completed)

References System.SR.ArgumentNull_Array, System.SR.ArgumentOutOfRange_IndexCountBuffer, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.byteCount, System.byteIndex, System.bytes, System.charCount, System.charIndex, System.chars, System.Text.DecoderNLS.Convert(), and System.Runtime.Serialization.Dictionary.