当前位置: 首页>>代码示例>>C#>>正文


C# IArea.ReadInt8方法代码示例

本文整理汇总了C#中IArea.ReadInt8方法的典型用法代码示例。如果您正苦于以下问题:C# IArea.ReadInt8方法的具体用法?C# IArea.ReadInt8怎么用?C# IArea.ReadInt8使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IArea的用法示例。


在下文中一共展示了IArea.ReadInt8方法的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);
            }
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:24,代码来源:TableStateStore.cs

示例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();
                }
            }
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:40,代码来源:IndexSetStore.cs

示例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);
            }
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:17,代码来源:FixedRecordList.cs


注:本文中的IArea.ReadInt8方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。