public override void Read(BinaryParser input) { this.ObjectId = input.ReadInt32(); this.Name = input.ReadString(); this.NumMembers = input.ReadInt32(); this.MemberNames = new string[this.NumMembers]; this.BinaryTypeEnumArray = new BinaryTypeEnum[this.NumMembers]; this.TypeInformationArray = new object[this.NumMembers]; this.MemberAssemIds = new int[this.NumMembers]; for (int i = 0; i < this.NumMembers; i++) { this.MemberNames[i] = input.ReadString(); } for (int j = 0; j < this.NumMembers; j++) { this.BinaryTypeEnumArray[j] = (BinaryTypeEnum)input.ReadByte(); } for (int k = 0; k < this.NumMembers; k++) { if ((this.BinaryTypeEnumArray[k] != BinaryTypeEnum.ObjectUrt) && (this.BinaryTypeEnumArray[k] != BinaryTypeEnum.ObjectUser)) { this.TypeInformationArray[k] = BinaryTypeConverter.ReadTypeInfo(this.BinaryTypeEnumArray[k], input, out this.MemberAssemIds[k]); } else { BinaryTypeConverter.ReadTypeInfo(this.BinaryTypeEnumArray[k], input, out this.MemberAssemIds[k]); } } if (this.BinaryHeaderEnum == BinaryHeaderEnum.ObjectWithMapTypedAssemId) { this.AssemId = input.ReadInt32(); } }
public override void Read(BinaryParser input) { switch (this._binaryHeaderEnum) { case BinaryHeaderEnum.ArraySinglePrimitive: this.ObjectId = input.ReadInt32(); this._lengthA = new int[] { input.ReadInt32() }; this._binaryArrayTypeEnum = BinaryArrayTypeEnum.Single; this._rank = 1; this._lowerBoundA = new int[this._rank]; this._binaryTypeEnum = BinaryTypeEnum.Primitive; this._typeInformation = (PrimitiveTypeEnum)input.ReadByte(); return; case BinaryHeaderEnum.ArraySingleObject: this.ObjectId = input.ReadInt32(); this._lengthA = new int[] { input.ReadInt32() }; this._binaryArrayTypeEnum = BinaryArrayTypeEnum.Single; this._rank = 1; this._lowerBoundA = new int[this._rank]; this._binaryTypeEnum = BinaryTypeEnum.Object; this._typeInformation = null; return; case BinaryHeaderEnum.ArraySingleString: this.ObjectId = input.ReadInt32(); this._lengthA = new int[] { input.ReadInt32() }; this._binaryArrayTypeEnum = BinaryArrayTypeEnum.Single; this._rank = 1; this._lowerBoundA = new int[this._rank]; this._binaryTypeEnum = BinaryTypeEnum.String; this._typeInformation = null; return; } this.ObjectId = input.ReadInt32(); this._binaryArrayTypeEnum = (BinaryArrayTypeEnum)input.ReadByte(); this._rank = input.ReadInt32(); this._lengthA = new int[this._rank]; this._lowerBoundA = new int[this._rank]; for (int i = 0; i < this._rank; i++) { this._lengthA[i] = input.ReadInt32(); } if ((this._binaryArrayTypeEnum == BinaryArrayTypeEnum.SingleOffset) || ((this._binaryArrayTypeEnum == BinaryArrayTypeEnum.JaggedOffset) || (this._binaryArrayTypeEnum == BinaryArrayTypeEnum.RectangularOffset))) { for (int j = 0; j < this._rank; j++) { this._lowerBoundA[j] = input.ReadInt32(); } } this._binaryTypeEnum = (BinaryTypeEnum)input.ReadByte(); this._typeInformation = BinaryTypeConverter.ReadTypeInfo(this._binaryTypeEnum, input, out this._assemId); }