Пример #1
0
        //protected int OffsetOfUpperBounds;

        protected SortedTreeScannerBase(byte level, int blockSize, BinaryStreamPointerBase stream, Func <TKey, byte, uint> lookupKey)
        {
            m_tempKey = new TKey();
            //m_lowerKey = new TKey();
            //m_upperKey = new TKey();
            m_lookupKey = lookupKey;
            m_level     = level;

            //m_currentNode = new Node(stream, blockSize);
            KeyMethods = m_tempKey.CreateValueMethods();
            KeySize    = new TKey().Size;
            ValueSize  = new TValue().Size;

            //OffsetOfUpperBounds = OffsetOfLowerBounds + KeySize;
            HeaderSize          = OffsetOfLowerBounds + 2 * KeySize;
            m_blockSize         = blockSize;
            Stream              = stream;
            PointerVersion      = -1;
            IndexOfNextKeyValue = 0;
            RecordCount         = 0;
        }
Пример #2
0
 /// <summary>
 /// The constructor that is used for inheriting. Must call Initialize before using it.
 /// </summary>
 /// <param name="level"></param>
 protected Node(byte level)
 {
     Level      = level;
     KeyMethods = new TKey().CreateValueMethods();
     KeySize    = new TKey().Size;
 }