예제 #1
0
        public Record ReadRecord(long index)
        {
            var record = new byte[_pageSize];

            Stream.Position = index * _pageSize;

            Stream.Read(record, 0, _pageSize);

            DiskOperations++;
            return(new Record(BC.ToDouble(record, 0), BC.ToInt16(record, 8)));
        }
예제 #2
0
 internal static int GetShort(byte[] memory, int index)
 {
     return(BitConverter.ToInt16(memory, index));
 }
예제 #3
0
 /// <summary>
 /// Reads the value of the specified type from the buffer.
 /// </summary>
 /// <param name="value">The OUT variable to store the SHORT value in.</param>
 /// <exception cref="System.ArgumentException"/>
 /// <exception cref="System.ArgumentNullException"/>
 /// <exception cref="System.ArgumentOutOfRangeException"/>
 public void Read(out short value)
 {
     value    = BitConverter.ToInt16(memory, iterator);
     iterator = (iterator + (int)BufferTypeSize.Int16 + fastAlign) & fastAlignNot;
 }