ReadBlocks() public method

Read a list of blocks and advance the position.
public ReadBlocks ( int totalSize, int blockSize ) : List
totalSize int The total number of bytes to read
blockSize int The size of each block
return List
        /// <summary>
        /// Deserialize next object from a FastTransferStream.
        /// </summary>
        /// <param name="stream">A FastTransferStream</param>
        public override void ConsumeNext(FastTransferStream stream)
        {
            base.ConsumeNext(stream);
            PropertyDataType type = (PropertyDataType)this.PropType;

            this.length = stream.ReadInt16();
            switch (type)
            {
            case PropertyDataType.PtypMultipleInteger16:
                this.fixedSizeValueList = stream.ReadBlocks(this.length, 2);
                break;

            case PropertyDataType.PtypMultipleInteger32:
                this.fixedSizeValueList = stream.ReadBlocks(this.length, 4);
                break;

            case PropertyDataType.PtypMultipleFloating32:
                this.fixedSizeValueList = stream.ReadBlocks(this.length, 4);
                break;

            case PropertyDataType.PtypMultipleFloating64:
                this.fixedSizeValueList = stream.ReadBlocks(this.length, 8);
                break;

            case PropertyDataType.PtypMultipleCurrency:
                this.fixedSizeValueList = stream.ReadBlocks(this.length, 8);
                break;

            case PropertyDataType.PtypMultipleFloatingTime:
                this.fixedSizeValueList = stream.ReadBlocks(this.length, 8);
                break;

            case PropertyDataType.PtypMultipleInteger64:
                this.fixedSizeValueList = stream.ReadBlocks(this.length, 8);
                break;

            case PropertyDataType.PtypMultipleTime:
                this.fixedSizeValueList = stream.ReadBlocks(this.length, 8);
                break;

            case PropertyDataType.PtypMultipleGuid:
                this.fixedSizeValueList = stream.ReadBlocks(this.length, Guid.Empty.ToByteArray().Length);
                break;

            case PropertyDataType.PtypMultipleBinary:
                this.varSizeValueList = stream.ReadLengthBlocks(this.length);
                break;

            case PropertyDataType.PtypMultipleString:
                this.varSizeValueList = stream.ReadLengthBlocks(this.length);
                break;

            case PropertyDataType.PtypMultipleString8:
                this.varSizeValueList = stream.ReadLengthBlocks(this.length);
                break;
            }
        }
 /// <summary>
 /// Deserialize next object from a FastTransferStream.
 /// </summary>
 /// <param name="stream">A FastTransferStream</param>
 public override void ConsumeNext(FastTransferStream stream)
 {
     base.ConsumeNext(stream);
     PropertyDataType type = (PropertyDataType)this.PropType;
     this.length = stream.ReadInt16();
     switch (type)
     {
         case PropertyDataType.PtypMultipleInteger16:
             this.fixedSizeValueList = stream.ReadBlocks(this.length, 2);
             break;
         case PropertyDataType.PtypMultipleInteger32:
             this.fixedSizeValueList = stream.ReadBlocks(this.length, 4);
             break;
         case PropertyDataType.PtypMultipleFloating32:
             this.fixedSizeValueList = stream.ReadBlocks(this.length, 4);
             break;
         case PropertyDataType.PtypMultipleFloating64:
             this.fixedSizeValueList = stream.ReadBlocks(this.length, 8);
             break;
         case PropertyDataType.PtypMultipleCurrency:
             this.fixedSizeValueList = stream.ReadBlocks(this.length, 8);
             break;
         case PropertyDataType.PtypMultipleFloatingTime:
             this.fixedSizeValueList = stream.ReadBlocks(this.length, 8);
             break;
         case PropertyDataType.PtypMultipleInteger64:
             this.fixedSizeValueList = stream.ReadBlocks(this.length, 8);
             break;
         case PropertyDataType.PtypMultipleTime:
             this.fixedSizeValueList = stream.ReadBlocks(this.length, 8);
             break;
         case PropertyDataType.PtypMultipleGuid:
             this.fixedSizeValueList = stream.ReadBlocks(this.length, Guid.Empty.ToByteArray().Length);
             break;
         case PropertyDataType.PtypMultipleBinary:
             this.varSizeValueList = stream.ReadLengthBlocks(this.length);
             break;
         case PropertyDataType.PtypMultipleString:
             this.varSizeValueList = stream.ReadLengthBlocks(this.length);
             break;
         case PropertyDataType.PtypMultipleString8:
             this.varSizeValueList = stream.ReadLengthBlocks(this.length);
             break;
     }
 }