本文整理汇总了C#中IArea.ReadInt4方法的典型用法代码示例。如果您正苦于以下问题:C# IArea.ReadInt4方法的具体用法?C# IArea.ReadInt4怎么用?C# IArea.ReadInt4使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IArea
的用法示例。
在下文中一共展示了IArea.ReadInt4方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Open
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);
}
}
示例2: Open
public void Open(long startPointer)
{
lock (this) {
// Set up the start area
startArea = Store.GetArea(startPointer);
int magic = startArea.ReadInt4();
if (magic != Magic)
throw new IOException("Magic value for index set does not match.");
int version = startArea.ReadInt4();
if (version != 1)
throw new IOException("Unknown version for index set.");
// Setup the index_header area
indexHeaderPointer = startArea.ReadInt8();
indexHeaderArea = Store.GetArea(indexHeaderPointer);
// Read the index header area
version = indexHeaderArea.ReadInt4(); // version
if (version != 1)
throw new IOException("Incorrect version");
indexHeaderArea.ReadInt4(); // reserved
int indexCount = (int)indexHeaderArea.ReadInt8();
indexBlocks = new IndexBlock[indexCount];
// Initialize each index block
for (int i = 0; i < indexCount; ++i) {
int type = indexHeaderArea.ReadInt4();
int blockSize = indexHeaderArea.ReadInt4();
long indexBlockPointer = indexHeaderArea.ReadInt8();
if (type != 1)
throw new IOException("Do not understand index type: " + type);
indexBlocks[i] = new IndexBlock(this, i, blockSize, indexBlockPointer);
indexBlocks[i].AddReference();
}
}
}
示例3: Open
public void Open(long listPointer)
{
headerAreaId = listPointer;
headerArea = store.GetArea(headerAreaId);
int magic = headerArea.ReadInt4(); // MAGIC
if (magic != Magic)
throw new IOException("Incorrect magic for list block. [magic=" + magic + "]");
BlockCount = headerArea.ReadInt4();
headerArea.ReadInt8(); // Delete Chain Head
for (int i = 0; i < BlockCount; ++i) {
long blockPointer = headerArea.ReadInt8();
blockElements[i] = blockPointer;
blockAreas[i] = store.GetArea(blockPointer);
}
}