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

◆ GetCharCount() [6/7]

unsafe override int System.Text.DecoderNLS.GetCharCount ( byte[] bytes,
int index,
int count,
bool flush )
inlinevirtualinherited

Reimplemented from System.Text.Decoder.

Definition at line 71 of file DecoderNLS.cs.

72 {
73 if (bytes == null)
74 {
75 throw new ArgumentNullException("bytes", System.SR.ArgumentNull_Array);
76 }
77 if (index < 0 || count < 0)
78 {
79 throw new ArgumentOutOfRangeException((index < 0) ? "index" : "count", System.SR.ArgumentOutOfRange_NeedNonNegNum);
80 }
81 if (bytes.Length - index < count)
82 {
83 throw new ArgumentOutOfRangeException("bytes", System.SR.ArgumentOutOfRange_IndexCountBuffer);
84 }
85 if (bytes.Length == 0)
86 {
87 bytes = new byte[1];
88 }
89 fixed (byte* ptr = &bytes[0])
90 {
91 return GetCharCount(ptr + index, count, flush);
92 }
93 }
static string ArgumentOutOfRange_IndexCountBuffer
Definition SR.cs:78
static string ArgumentNull_Array
Definition SR.cs:24
Definition SR.cs:7
override int GetCharCount(byte[] bytes, int index, int count)
Definition DecoderNLS.cs:39

References System.SR.ArgumentNull_Array, System.SR.ArgumentOutOfRange_IndexCountBuffer, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.bytes, System.count, System.Runtime.Serialization.Dictionary, System.Text.DecoderNLS.GetCharCount(), and System.index.