public virtual ObjectName GetTableName(int offset)
{
if (Transaction.RealTableExists(TableName)) {
// Search the table. We assume that the schema and name of the object
// are in columns 0 and 1 respectively.
var table = Transaction.GetTable(TableName);
using (var rowE = table.GetEnumerator()) {
int p = 0;
while (rowE.MoveNext()) {
int rowIndex = rowE.Current.RowId.RowNumber;
if (offset == p) {
var obSchema = table.GetValue(rowIndex, SchemaColumnOffset);
var obName = table.GetValue(rowIndex, NameColumnOffset);
return new ObjectName(new ObjectName(obSchema.Value.ToString()), obName.Value.ToString());
}
++p;
}
}
}
throw new IndexOutOfRangeException("Out of bounds.");
}