Пример #1
0
        public CacheRow Find(string identityCode, string searchKey)
        {
            CacheRow cacheRow      = null;
            long     lastRowNumber = 0;

            if (binaryFiles.ContainsKey(identityCode))
            {
                BinaryNavigator navigator = binaryFiles[identityCode].Navigator;
                navigator.MoveToFirst();
                object[] row   = null;
                bool     found = false;
                while (!navigator.EOF())
                {
                    lastRowNumber = navigator.RowNumber;
                    row           = navigator.Read();
                    if (((long)row[0]).ToString() == searchKey)
                    {
                        found = true;
                        break;
                    }
                }

                if (found)
                {
                    cacheRow = new CacheRow(binaryFiles[identityCode].Header.Columns, lastRowNumber, row);
                }
            }

            return(cacheRow);
        }