UnityEditor.HeapshotReader.ReadObject C# (CSharp) Method

ReadObject() private method

private ReadObject ( BinaryReader reader ) : void
reader System.IO.BinaryReader
return void
        private void ReadObject(BinaryReader reader)
        {
            uint num3;
            uint num = reader.ReadUInt32();
            uint key = reader.ReadUInt32();
            ObjectInfo item = new ObjectInfo {
                code = num,
                size = reader.ReadUInt32()
            };
            if (!this.types.ContainsKey(key))
            {
                throw new Exception(string.Format("Failed to find type info {0} for object {1}!!!", key, num));
            }
            item.typeInfo = this.types[key];
            while ((num3 = reader.ReadUInt32()) != 0)
            {
                ReferenceInfo info2 = new ReferenceInfo {
                    code = num3
                };
                uint num4 = reader.ReadUInt32();
                if (num4 == 0)
                {
                    info2.fieldInfo = null;
                }
                else if (item.typeInfo.fields.ContainsKey(num4))
                {
                    info2.fieldInfo = item.typeInfo.fields[num4];
                }
                else
                {
                    info2.fieldInfo = null;
                }
                item.references.Add(info2);
            }
            if (this.objects.ContainsKey(num))
            {
                throw new Exception(string.Format("Object {0} was already loaded?!", num));
            }
            item.type = (num != key) ? ObjectType.Managed : ObjectType.Root;
            this.objects[num] = item;
            this.allObjects.Add(item);
        }