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

◆ _LoadObjectV1()

object System.Resources.ResourceReader._LoadObjectV1 ( int pos)
inlineprivate

Definition at line 649 of file ResourceReader.cs.

650 {
652 int num = _store.Read7BitEncodedInt();
653 if (num == -1)
654 {
655 return null;
656 }
657 Type type = FindType(num);
658 if (type == typeof(string))
659 {
660 return _store.ReadString();
661 }
662 if (type == typeof(int))
663 {
664 return _store.ReadInt32();
665 }
666 if (type == typeof(byte))
667 {
668 return _store.ReadByte();
669 }
670 if (type == typeof(sbyte))
671 {
672 return _store.ReadSByte();
673 }
674 if (type == typeof(short))
675 {
676 return _store.ReadInt16();
677 }
678 if (type == typeof(long))
679 {
680 return _store.ReadInt64();
681 }
682 if (type == typeof(ushort))
683 {
684 return _store.ReadUInt16();
685 }
686 if (type == typeof(uint))
687 {
688 return _store.ReadUInt32();
689 }
690 if (type == typeof(ulong))
691 {
692 return _store.ReadUInt64();
693 }
694 if (type == typeof(float))
695 {
696 return _store.ReadSingle();
697 }
698 if (type == typeof(double))
699 {
700 return _store.ReadDouble();
701 }
702 if (type == typeof(DateTime))
703 {
704 return new DateTime(_store.ReadInt64());
705 }
706 if (type == typeof(TimeSpan))
707 {
708 return new TimeSpan(_store.ReadInt64());
709 }
710 if (type == typeof(decimal))
711 {
712 int[] array = new int[4];
713 for (int i = 0; i < array.Length; i++)
714 {
715 array[i] = _store.ReadInt32();
716 }
717 return new decimal(array);
718 }
719 return DeserializeObject(num);
720 }
virtual double ReadDouble()
virtual byte ReadByte()
virtual string ReadString()
virtual ulong ReadUInt64()
virtual float ReadSingle()
virtual sbyte ReadSByte()
virtual ushort ReadUInt16()
virtual int ReadInt32()
virtual Stream BaseStream
virtual short ReadInt16()
virtual long ReadInt64()
virtual uint ReadUInt32()
object DeserializeObject(int typeIndex)

References System.Resources.ResourceReader._dataSectionOffset, System.Resources.ResourceReader._store, System.array, System.IO.BinaryReader.BaseStream, System.Resources.DateTime, System.Resources.ResourceReader.DeserializeObject(), System.Resources.ResourceReader.FindType(), System.IO.BinaryReader.Read7BitEncodedInt(), System.IO.BinaryReader.ReadByte(), System.IO.BinaryReader.ReadDouble(), System.IO.BinaryReader.ReadInt16(), System.IO.BinaryReader.ReadInt32(), System.IO.BinaryReader.ReadInt64(), System.IO.BinaryReader.ReadSByte(), System.IO.BinaryReader.ReadSingle(), System.IO.BinaryReader.ReadString(), System.IO.BinaryReader.ReadUInt16(), System.IO.BinaryReader.ReadUInt32(), System.IO.BinaryReader.ReadUInt64(), System.Resources.TimeSpan, and System.type.

Referenced by System.Resources.ResourceReader.LoadObjectV1().