private void CheckOffset(long offset)
{
if (offset < DataAreaOffset || offset >= DataAreaEndOffset) {
throw new IOException(String.Format("The offset is out of range ({0} > {1} > {2})", DataAreaOffset, offset,
DataAreaEndOffset));
}
}
public StoreArea(StoreBase store, long id, long offset, bool readOnly, long fixedSize) { Store = store; Id = id; IsReadOnly = readOnly; // Check the offset is valid if (offset != FixedAreaOffset) { store.CheckOffset(offset); } StartOffset = offset; position = StartOffset; EndOffset = StartOffset + fixedSize; }