Example #1
0
        public void Read(BinaryParser input)
        {
            // binaryHeaderEnum has already been read
            _objectId         = input.ReadInt32();
            _name             = input.ReadString();
            _numMembers       = input.ReadInt32();
            _memberNames      = new string[_numMembers];
            _binaryTypeEnumA  = new BinaryTypeEnum[_numMembers];
            _typeInformationA = new object[_numMembers];
            _memberAssemIds   = new int[_numMembers];
            for (int i = 0; i < _numMembers; i++)
            {
                _memberNames[i] = input.ReadString();
            }
            for (int i = 0; i < _numMembers; i++)
            {
                _binaryTypeEnumA[i] = (BinaryTypeEnum)input.ReadByte();
            }
            for (int i = 0; i < _numMembers; i++)
            {
                if (_binaryTypeEnumA[i] != BinaryTypeEnum.ObjectUrt && _binaryTypeEnumA[i] != BinaryTypeEnum.ObjectUser)
                {
                    _typeInformationA[i] = BinaryTypeConverter.ReadTypeInfo(_binaryTypeEnumA[i], input, out _memberAssemIds[i]);
                }
                else
                {
                    BinaryTypeConverter.ReadTypeInfo(_binaryTypeEnumA[i], input, out _memberAssemIds[i]);
                }
            }

            if (_binaryHeaderEnum == BinaryHeaderEnum.ObjectWithMapTypedAssemId)
            {
                _assemId = input.ReadInt32();
            }
        }
        public void Read(BinaryParser input)
        {
            // binaryHeaderEnum has already been read
            _objectId = input.ReadInt32();
            _name = input.ReadString();
            _numMembers = input.ReadInt32();
            _memberNames = new string[_numMembers];
            _binaryTypeEnumA = new BinaryTypeEnum[_numMembers];
            _typeInformationA = new object[_numMembers];
            _memberAssemIds = new int[_numMembers];
            for (int i = 0; i < _numMembers; i++)
            {
                _memberNames[i] = input.ReadString();
            }
            for (int i = 0; i < _numMembers; i++)
            {
                _binaryTypeEnumA[i] = (BinaryTypeEnum)input.ReadByte();
            }
            for (int i = 0; i < _numMembers; i++)
            {
                if (_binaryTypeEnumA[i] != BinaryTypeEnum.ObjectUrt && _binaryTypeEnumA[i] != BinaryTypeEnum.ObjectUser)
                {
                    _typeInformationA[i] = BinaryTypeConverter.ReadTypeInfo(_binaryTypeEnumA[i], input, out _memberAssemIds[i]);
                }
                else
                {
                    BinaryTypeConverter.ReadTypeInfo(_binaryTypeEnumA[i], input, out _memberAssemIds[i]);
                }
            }

            if (_binaryHeaderEnum == BinaryHeaderEnum.ObjectWithMapTypedAssemId)
            {
                _assemId = input.ReadInt32();
            }
        }
Example #3
0
        public void Read(BinaryParser input)
        {
            _objectId = input.ReadInt32();
            _name = input.ReadString();
            _numMembers = input.ReadInt32();

            _memberNames = new string[_numMembers];
            for (int i = 0; i < _numMembers; i++)
            {
                _memberNames[i] = input.ReadString();
            }

            if (_binaryHeaderEnum == BinaryHeaderEnum.ObjectWithMapAssemId)
            {
                _assemId = input.ReadInt32();
            }
        }
Example #4
0
        public void Read(BinaryParser input)
        {
            _objectId   = input.ReadInt32();
            _name       = input.ReadString();
            _numMembers = input.ReadInt32();

            _memberNames = new string[_numMembers];
            for (int i = 0; i < _numMembers; i++)
            {
                _memberNames[i] = input.ReadString();
            }

            if (_binaryHeaderEnum == BinaryHeaderEnum.ObjectWithMapAssemId)
            {
                _assemId = input.ReadInt32();
            }
        }
Example #5
0
 public void Read(BinaryParser input, BinaryHeaderEnum binaryHeaderEnum)
 {
     //binaryHeaderEnum = input.ReadByte(); already read
     switch (binaryHeaderEnum)
     {
         case BinaryHeaderEnum.ObjectNull:
             _nullCount = 1;
             break;
         case BinaryHeaderEnum.ObjectNullMultiple256:
             _nullCount = input.ReadByte();
             break;
         case BinaryHeaderEnum.ObjectNullMultiple:
             _nullCount = input.ReadInt32();
             break;
     }
 }
Example #6
0
        public void Read(BinaryParser input, BinaryHeaderEnum binaryHeaderEnum)
        {
            //binaryHeaderEnum = input.ReadByte(); already read
            switch (binaryHeaderEnum)
            {
            case BinaryHeaderEnum.ObjectNull:
                _nullCount = 1;
                break;

            case BinaryHeaderEnum.ObjectNullMultiple256:
                _nullCount = input.ReadByte();
                break;

            case BinaryHeaderEnum.ObjectNullMultiple:
                _nullCount = input.ReadInt32();
                break;
            }
        }
 public void Read(BinaryParser input)
 {
     _objectId = input.ReadInt32();
     _value    = input.ReadString();
 }
Example #8
0
 public void Read(BinaryParser input)
 {
     _objectId = input.ReadInt32();
     _value = input.ReadString();
 }
Example #9
0
 public void Read(BinaryParser input)
 {
     _assemId = input.ReadInt32();
     _assemblyString = input.ReadString();
 }
Example #10
0
 public void Read(BinaryParser input)
 {
     _crossAppDomainArrayIndex = input.ReadInt32();
 }
Example #11
0
 public void Read(BinaryParser input)
 {
     //binaryHeaderEnum = input.ReadByte(); already read
     _idRef = input.ReadInt32();
 }
 public void Read(BinaryParser input)
 {
     _assemId       = input.ReadInt32();
     _assemblyIndex = input.ReadInt32();
 }
Example #13
0
 public void Read(BinaryParser input)
 {
     switch (_binaryHeaderEnum)
     {
         case BinaryHeaderEnum.ArraySinglePrimitive:
             _objectId = input.ReadInt32();
             _lengthA = new int[1];
             _lengthA[0] = input.ReadInt32();
             _binaryArrayTypeEnum = BinaryArrayTypeEnum.Single;
             _rank = 1;
             _lowerBoundA = new int[_rank];
             _binaryTypeEnum = BinaryTypeEnum.Primitive;
             _typeInformation = (InternalPrimitiveTypeE)input.ReadByte();
             break;
         case BinaryHeaderEnum.ArraySingleString:
             _objectId = input.ReadInt32();
             _lengthA = new int[1];
             _lengthA[0] = input.ReadInt32();
             _binaryArrayTypeEnum = BinaryArrayTypeEnum.Single;
             _rank = 1;
             _lowerBoundA = new int[_rank];
             _binaryTypeEnum = BinaryTypeEnum.String;
             _typeInformation = null;
             break;
         case BinaryHeaderEnum.ArraySingleObject:
             _objectId = input.ReadInt32();
             _lengthA = new int[1];
             _lengthA[0] = input.ReadInt32();
             _binaryArrayTypeEnum = BinaryArrayTypeEnum.Single;
             _rank = 1;
             _lowerBoundA = new int[_rank];
             _binaryTypeEnum = BinaryTypeEnum.Object;
             _typeInformation = null;
             break;
         default:
             _objectId = input.ReadInt32();
             _binaryArrayTypeEnum = (BinaryArrayTypeEnum)input.ReadByte();
             _rank = input.ReadInt32();
             _lengthA = new int[_rank];
             _lowerBoundA = new int[_rank];
             for (int i = 0; i < _rank; i++)
             {
                 _lengthA[i] = input.ReadInt32();
             }
             if ((_binaryArrayTypeEnum == BinaryArrayTypeEnum.SingleOffset) ||
                 (_binaryArrayTypeEnum == BinaryArrayTypeEnum.JaggedOffset) ||
                 (_binaryArrayTypeEnum == BinaryArrayTypeEnum.RectangularOffset))
             {
                 for (int i = 0; i < _rank; i++)
                 {
                     _lowerBoundA[i] = input.ReadInt32();
                 }
             }
             _binaryTypeEnum = (BinaryTypeEnum)input.ReadByte();
             _typeInformation = BinaryTypeConverter.ReadTypeInfo(_binaryTypeEnum, input, out _assemId);
             break;
     }
 }
Example #14
0
 public virtual void Read(BinaryParser input)
 {
     this.ObjectId = input.ReadInt32();
     this.MapId    = input.ReadInt32();
 }
Example #15
0
 public void Read(BinaryParser input)
 {
     //binaryHeaderEnum = input.ReadByte(); already read
     _idRef = input.ReadInt32();
 }
Example #16
0
 public void Read(BinaryParser input)
 {
     _objectId = input.ReadInt32();
     _mapId = input.ReadInt32();
 }
Example #17
0
        private static Object ReadIntegral(BinaryParser parser, TypeCode typeCode)
        {
            switch (typeCode)
            {
                case TypeCode.Byte: return parser.ReadByte();
                case TypeCode.UInt16: return parser.ReadUInt16();
                case TypeCode.UInt32: return parser.ReadUInt32();
                case TypeCode.UInt64: return parser.ReadUInt64();

                case TypeCode.SByte: return parser.ReadSByte();
                case TypeCode.Int16: return parser.ReadInt16();
                case TypeCode.Int32: return parser.ReadInt32();
                case TypeCode.Int64: return parser.ReadInt64();
            }

            return null;
        }
 public void Read(BinaryParser input)
 {
     _assemId = input.ReadInt32();
     _assemblyIndex = input.ReadInt32();
 }
 public void Read(BinaryParser input)
 {
     _crossAppDomainArrayIndex = input.ReadInt32();
 }
Example #20
0
        public void Read(BinaryParser input)
        {
            switch (_binaryHeaderEnum)
            {
            case BinaryHeaderEnum.ArraySinglePrimitive:
                _objectId            = input.ReadInt32();
                _lengthA             = new int[1];
                _lengthA[0]          = input.ReadInt32();
                _binaryArrayTypeEnum = BinaryArrayTypeEnum.Single;
                _rank            = 1;
                _lowerBoundA     = new int[_rank];
                _binaryTypeEnum  = BinaryTypeEnum.Primitive;
                _typeInformation = (InternalPrimitiveTypeE)input.ReadByte();
                break;

            case BinaryHeaderEnum.ArraySingleString:
                _objectId            = input.ReadInt32();
                _lengthA             = new int[1];
                _lengthA[0]          = input.ReadInt32();
                _binaryArrayTypeEnum = BinaryArrayTypeEnum.Single;
                _rank            = 1;
                _lowerBoundA     = new int[_rank];
                _binaryTypeEnum  = BinaryTypeEnum.String;
                _typeInformation = null;
                break;

            case BinaryHeaderEnum.ArraySingleObject:
                _objectId            = input.ReadInt32();
                _lengthA             = new int[1];
                _lengthA[0]          = input.ReadInt32();
                _binaryArrayTypeEnum = BinaryArrayTypeEnum.Single;
                _rank            = 1;
                _lowerBoundA     = new int[_rank];
                _binaryTypeEnum  = BinaryTypeEnum.Object;
                _typeInformation = null;
                break;

            default:
                _objectId            = input.ReadInt32();
                _binaryArrayTypeEnum = (BinaryArrayTypeEnum)input.ReadByte();
                _rank        = input.ReadInt32();
                _lengthA     = new int[_rank];
                _lowerBoundA = new int[_rank];
                for (int i = 0; i < _rank; i++)
                {
                    _lengthA[i] = input.ReadInt32();
                }
                if ((_binaryArrayTypeEnum == BinaryArrayTypeEnum.SingleOffset) ||
                    (_binaryArrayTypeEnum == BinaryArrayTypeEnum.JaggedOffset) ||
                    (_binaryArrayTypeEnum == BinaryArrayTypeEnum.RectangularOffset))
                {
                    for (int i = 0; i < _rank; i++)
                    {
                        _lowerBoundA[i] = input.ReadInt32();
                    }
                }
                _binaryTypeEnum  = (BinaryTypeEnum)input.ReadByte();
                _typeInformation = BinaryTypeConverter.ReadTypeInfo(_binaryTypeEnum, input, out _assemId);
                break;
            }
        }
Example #21
0
 public void Read(BinaryParser input)
 {
     _objectId = input.ReadInt32();
     _mapId    = input.ReadInt32();
 }
Example #22
0
 public void Read(BinaryParser input)
 {
     _assemId        = input.ReadInt32();
     _assemblyString = input.ReadString();
 }