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

◆ GetTypeCode()

static int System.Reflection.DispatchProxyGenerator.ProxyBuilder.GetTypeCode ( Type type)
inlinestaticprivate

Definition at line 517 of file DispatchProxyGenerator.cs.

518 {
519 if (type == null)
520 {
521 return 0;
522 }
523 if (type == typeof(bool))
524 {
525 return 3;
526 }
527 if (type == typeof(char))
528 {
529 return 4;
530 }
531 if (type == typeof(sbyte))
532 {
533 return 5;
534 }
535 if (type == typeof(byte))
536 {
537 return 6;
538 }
539 if (type == typeof(short))
540 {
541 return 7;
542 }
543 if (type == typeof(ushort))
544 {
545 return 8;
546 }
547 if (type == typeof(int))
548 {
549 return 9;
550 }
551 if (type == typeof(uint))
552 {
553 return 10;
554 }
555 if (type == typeof(long))
556 {
557 return 11;
558 }
559 if (type == typeof(ulong))
560 {
561 return 12;
562 }
563 if (type == typeof(float))
564 {
565 return 13;
566 }
567 if (type == typeof(double))
568 {
569 return 14;
570 }
571 if (type == typeof(decimal))
572 {
573 return 15;
574 }
575 if (type == typeof(DateTime))
576 {
577 return 16;
578 }
579 if (type == typeof(string))
580 {
581 return 18;
582 }
583 if (type.IsEnum)
584 {
585 return GetTypeCode(Enum.GetUnderlyingType(type));
586 }
587 return 1;
588 }

References System.Reflection.DispatchProxyGenerator.ProxyBuilder.GetTypeCode(), System.Enum.GetUnderlyingType(), and System.type.

Referenced by System.Reflection.DispatchProxyGenerator.ProxyBuilder.Convert(), System.Reflection.DispatchProxyGenerator.ProxyBuilder.GetTypeCode(), System.Reflection.DispatchProxyGenerator.ProxyBuilder.Ldind(), and System.Reflection.DispatchProxyGenerator.ProxyBuilder.Stind().