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

◆ Convert() [2/5]

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

Reimplemented from System.Text.Decoder.

Definition at line 205 of file DecoderNLS.cs.

206 {
207 if (chars == null || bytes == null)
208 {
209 throw new ArgumentNullException((chars == null) ? "chars" : "bytes", System.SR.ArgumentNull_Array);
210 }
211 if (byteCount < 0 || charCount < 0)
212 {
213 throw new ArgumentOutOfRangeException((byteCount < 0) ? "byteCount" : "charCount", System.SR.ArgumentOutOfRange_NeedNonNegNum);
214 }
216 m_throwOnOverflow = false;
217 m_bytesUsed = 0;
218 charsUsed = m_encoding.GetChars(bytes, byteCount, chars, charCount, this);
219 bytesUsed = m_bytesUsed;
220 completed = bytesUsed == byteCount && (!flush || !HasState) && (m_fallbackBuffer == null || m_fallbackBuffer.Remaining == 0);
221 }
EncodingNLS m_encoding
Definition DecoderNLS.cs:7
virtual bool HasState
Definition DecoderNLS.cs:22
DecoderFallbackBuffer m_fallbackBuffer
Definition DecoderNLS.cs:17
unsafe int GetChars(byte *bytes, int byteCount, char *chars, int charCount, System.Text.DecoderNLS decoder)

References System.SR.ArgumentNull_Array, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.byteCount, System.bytes, System.charCount, System.chars, System.Runtime.Serialization.Dictionary, System.Text.EncodingNLS.GetChars(), System.Text.DecoderNLS.HasState, System.Text.DecoderNLS.m_bytesUsed, System.Text.DecoderNLS.m_encoding, System.Text.DecoderNLS.m_fallbackBuffer, System.Text.DecoderNLS.m_mustFlush, System.Text.DecoderNLS.m_throwOnOverflow, and System.Text.DecoderFallbackBuffer.Remaining.