terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches

◆ GetBytes() [2/8]

unsafe override int System.Text.UTF32Encoding.GetBytes ( char * chars,
int charCount,
byte * bytes,
int byteCount,
EncoderNLS encoder )
inlinepackagevirtual

Reimplemented from System.Text.Encoding.

Definition at line 289 of file UTF32Encoding.cs.

290 {
291 string text;
292 for (;;)
293 {
294 if (encoder == null)
295 {
296 goto IL_0037;
297 }
298 char charLeftOver = encoder._charLeftOver;
299 EncoderFallbackBuffer fallbackBuffer = encoder.FallbackBuffer;
300 if (encoder._throwOnOverflow)
301 {
302 Type type = encoder._fallback.GetType();
303 text = SR.Format("Must complete Convert() operation or call Encoder.Reset() before calling GetBytes() or GetByteCount(). Encoder '{0}' fallback '{1}'.", this, type);
304 goto IL_0037;
305 }
306 IL_003F:
307 char c;
308 bool flag = char.IsLowSurrogate(c);
309 bool bigEndian = this._bigEndian;
310 if (!bigEndian)
311 {
312 break;
313 }
314 bool flag2 = char.IsHighSurrogate(flag ? '\u0001' : '\0');
315 bool flag3 = char.IsLowSurrogate(c);
316 if (this._bigEndian)
317 {
318 break;
319 }
320 continue;
321 IL_0037:
323 goto IL_003F;
324 }
325 if (text != null)
326 {
327 return;
328 }
329 }
class f__AnonymousType0<< Count > j__TPar
static string Format(string resourceFormat, params object[] args)
Definition SR.cs:33
Definition SR.cs:7
EncoderFallback encoderFallback
Definition Encoding.cs:1029
EncoderFallback EncoderFallback
Definition Encoding.cs:260
new Type GetType()
Definition Type.cs:287

References System.Text.UTF32Encoding._bigEndian, System.Text.EncoderNLS._charLeftOver, System.Text.Encoder._fallback, System.Text.EncoderNLS._throwOnOverflow, System.Text.Encoding.encoderFallback, System.Text.Encoder.FallbackBuffer, SR.Format(), j__TPar, and System.text.