Пример #1
0
        public ColumnIndex GetIndex(int columnOffset)
        {
            AssertNotDisposed();

            if (columnOffset < 0 || columnOffset >= ColumnCount)
            {
                throw new ArgumentOutOfRangeException("columnOffset");
            }

            var index = columnIndexes[columnOffset];

            // Cache the scheme in this object.
            if (index == null)
            {
                index = TableSource.CreateColumnIndex(indexSet, this, columnOffset);
                columnIndexes[columnOffset] = index;
            }

            // Update the underlying scheme to the most current version.
            EnsureColumnIndexCurrent(columnOffset);

            return(index);
        }