public Block(long id, BlockOptions options, Stream stream) { Id = id; _options = options; _stream = stream; _blockHeadersCount = options.BlockHeaderSize / _1B; _cachedHeaders = BlockHeader.ToDictionary <long?>(); _blockFirstSector = new byte[_options.DiskSectorSize]; _originPositionInStream = Id * _options.BlockSize; ReadBlockFirstSector(); }
public BlockStorage(Stream stream, BlockOptions options) { _stream = stream ?? throw new ArgumentNullException(nameof(stream)); _options = options ?? throw new ArgumentNullException(nameof(options)); }