public void Open(long offset)
{
lock (this) {
headerArea = Store.GetArea(offset);
int magicValue = headerArea.ReadInt4();
if (magicValue != Magic)
throw new IOException("Magic value for state header area is incorrect.");
if (headerArea.ReadInt4() != 0)
throw new IOException("Unknown version for state header area.");
currentTableId = (int)headerArea.ReadInt8();
visAreaPointer = headerArea.ReadInt8();
delAreaPointer = headerArea.ReadInt8();
// Setup the visible and delete list
visibleList = new List<TableState>();
deleteList = new List<TableState>();
// Read the resource list for the visible and delete list.
ReadStateResourceList(visibleList, visAreaPointer);
ReadStateResourceList(deleteList, delAreaPointer);
}
}