Пример #1
0
        private long GetIdPosition(OID oid)
        {
            // first check if it is the last
            if (_lastIds[_lastIdIndex] != null && _lastIds[_lastIdIndex].Equals(oid))
            {
                return(_lastIdPositions[(_lastIdIndex)]);
            }

            for (var i = 0; i < IdBufferSize; i++)
            {
                if (_lastIds[i] != null && _lastIds[i].Equals(oid))
                {
                    return(_lastIdPositions[i]);
                }
            }

            // object id is not is cache
            return(_objectReader.ReadOidPosition(oid));
        }