Пример #1
0
        public Dev2PersistantDictionary(string filename)
        {
            if (!string.IsNullOrEmpty(filename))
            {
                _completeFilename = _dataListPersistPath + filename + _ext;

                _lstIndexes = new BinaryDataListIndexStorage(filename);
            }

            _file         = new FileStream(_completeFilename, FileMode.OpenOrCreate, FileAccess.ReadWrite);
            _bufferedFile = new BufferedStream(_file, _fileBufferSize);
        }
Пример #2
0
        public Dev2PersistantDictionary(string dataPath, string indexPath)
        {
            if (string.IsNullOrEmpty(dataPath) || string.IsNullOrEmpty(indexPath))
            {
                throw new Exception("Null Data and/or Index Path");
            }

            _lstIndexes = new BinaryDataListIndexStorage(indexPath);

            _completeFilename = dataPath;

            _file         = new FileStream(dataPath, FileMode.OpenOrCreate, FileAccess.ReadWrite);
            _bufferedFile = new BufferedStream(_file, _fileBufferSize);
        }