Deveel.Data.Store.StoreBase.CheckOffset C# (CSharp) Method

CheckOffset() private method

private CheckOffset ( long offset ) : void
offset long
return void
        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));
            }
        }

Usage Example

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;
            }
All Usage Examples Of Deveel.Data.Store.StoreBase::CheckOffset