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

◆ Convert() [2/5]

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

Reimplemented from System.Text.Encoder.

Definition at line 202 of file EncoderNLS.cs.

203 {
204 if (bytes == null || chars == null)
205 {
206 throw new ArgumentNullException((bytes == null) ? "bytes" : "chars", System.SR.ArgumentNull_Array);
207 }
208 if (charCount < 0 || byteCount < 0)
209 {
210 throw new ArgumentOutOfRangeException((charCount < 0) ? "charCount" : "byteCount", System.SR.ArgumentOutOfRange_NeedNonNegNum);
211 }
213 m_throwOnOverflow = false;
214 m_charsUsed = 0;
215 bytesUsed = m_encoding.GetBytes(chars, charCount, bytes, byteCount, this);
216 charsUsed = m_charsUsed;
217 completed = charsUsed == charCount && (!flush || !HasState) && (m_fallbackBuffer == null || m_fallbackBuffer.Remaining == 0);
218 }
EncoderFallbackBuffer m_fallbackBuffer
Definition EncoderNLS.cs:19
EncodingNLS m_encoding
Definition EncoderNLS.cs:9
virtual bool HasState
Definition EncoderNLS.cs:38
unsafe int GetBytes(char *chars, int charCount, byte *bytes, int byteCount, System.Text.EncoderNLS encoder)

References System.SR.ArgumentNull_Array, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.byteCount, System.bytes, System.charCount, System.chars, System.Runtime.Serialization.Dictionary, System.Text.EncodingNLS.GetBytes(), System.Text.EncoderNLS.HasState, System.Text.EncoderNLS.m_charsUsed, System.Text.EncoderNLS.m_encoding, System.Text.EncoderNLS.m_fallbackBuffer, System.Text.EncoderNLS.m_mustFlush, System.Text.EncoderNLS.m_throwOnOverflow, and System.Text.EncoderFallbackBuffer.Remaining.