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

◆ GetChars() [6/7]

unsafe override int System.Text.DecoderNLS.GetChars ( byte[] bytes,
int byteIndex,
int byteCount,
char[] chars,
int charIndex,
bool flush )
inlinevirtualinherited

Reimplemented from System.Text.Decoder.

Definition at line 115 of file DecoderNLS.cs.

116 {
117 if (bytes == null || chars == null)
118 {
119 throw new ArgumentNullException((bytes == null) ? "bytes" : "chars", System.SR.ArgumentNull_Array);
120 }
121 if (byteIndex < 0 || byteCount < 0)
122 {
123 throw new ArgumentOutOfRangeException((byteIndex < 0) ? "byteIndex" : "byteCount", System.SR.ArgumentOutOfRange_NeedNonNegNum);
124 }
125 if (bytes.Length - byteIndex < byteCount)
126 {
127 throw new ArgumentOutOfRangeException("bytes", System.SR.ArgumentOutOfRange_IndexCountBuffer);
128 }
130 {
131 throw new ArgumentOutOfRangeException("charIndex", System.SR.ArgumentOutOfRange_Index);
132 }
133 if (bytes.Length == 0)
134 {
135 bytes = new byte[1];
136 }
138 if (chars.Length == 0)
139 {
140 chars = new char[1];
141 }
142 fixed (byte* ptr = &bytes[0])
143 {
144 fixed (char* ptr2 = &chars[0])
145 {
147 }
148 }
149 }
static string ArgumentOutOfRange_Index
Definition SR.cs:30
static string ArgumentOutOfRange_IndexCountBuffer
Definition SR.cs:78
Definition SR.cs:7
override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex)
Definition DecoderNLS.cs:79

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