Example #1
0
 public RandomAccessFile(string fileName, string fileTreeData, int maxRecords)
 {
     _workingBlock        = new Block <T>(maxRecords);
     MaxRecords           = maxRecords;
     _file                = new BinaryFileManager(fileName, _workingBlock.GetSize());
     _freeBlocks          = new List <int>();
     _partiallyFullBlocks = new List <int>();
     _fileTreeData        = fileTreeData;
 }
Example #2
0
 public DynHash(FilePaths files, int maxRecords, int maxRecordsInOverflow)
 {
     Root                 = new ExternalTrieNode();
     _files               = files;
     MaxRecords           = maxRecords;
     MaxRecordsInOverflow = maxRecordsInOverflow;
     _overflowBlock       = new Block <T>(maxRecordsInOverflow);
     _workingBlock1       = new Block <T>(maxRecords);
     _freeBlocks          = new List <int>();
     _freeBlocksOverflow  = new List <int>();
     _blockFile           = new BinaryFileManager(_files.FileBlockData, _workingBlock1.GetSize());
     _overflowFile        = new BinaryFileManager(_files.FileOverflowFile, _overflowBlock.GetSize());
 }