Exemplo n.º 1
0
            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;
            }
Exemplo n.º 2
0
            public StoreArea(StoreBase store, long id, long offset, bool readOnly)
            {
                Store      = store;
                Id         = id;
                IsReadOnly = readOnly;

                store.CheckOffset(offset);

                store.Read(offset, buffer, 0, 8);
                long v = ByteBuffer.ReadInt8(buffer, 0);

                if ((v & DeletedFlag) != 0)
                {
                    throw new IOException("Store being constructed on deleted area.");
                }

                long maxSize = v - 16;

                StartOffset = offset + 8;
                position    = StartOffset;
                EndOffset   = StartOffset + maxSize;
            }
Exemplo n.º 3
0
            public StoreArea(StoreBase store, long id, long offset, bool readOnly)
            {
                Store = store;
                Id = id;
                IsReadOnly = readOnly;

                store.CheckOffset(offset);

                store.Read(offset, buffer, 0, 8);
                long v = ByteBuffer.ReadInt8(buffer, 0);
                if ((v & DeletedFlag) != 0)
                    throw new IOException("Store being constructed on deleted area.");

                long maxSize = v - 16;
                StartOffset = offset + 8;
                position = StartOffset;
                EndOffset = StartOffset + maxSize;
            }
Exemplo n.º 4
0
            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;
            }
Exemplo n.º 5
0
            protected virtual void Dispose(bool disposing)
            {
                if (disposing) {
                    // TODO:
                }

                buffer = null;
                Store = null;
            }