private int GetRnColIndex() { var rnCol = TOM_Collection.FirstOrDefault(c => c.Type == TOM.ColumnType.RowNumber); if (rnCol != null) { return(TOM_Collection.IndexOf(rnCol)); } return(-1); }
internal override int IndexOf(TOM.MetadataObject value) { var ix = TOM_Collection.IndexOf(value as TOM.Column); var rnIx = GetRnColIndex(); if (ix == rnIx) { throw new KeyNotFoundException(); } if (ix > rnIx && rnIx > -1) { ix--; } return(ix); }