internal override void Bind(DataTable table, List<DataColumn> list)
{
BindTable(table);
if (table == null)
throw ExprException.UnboundName(_name);
try
{
_column = table.Columns[_name];
}
catch (Exception e)
{
_found = false;
if (!Common.ADP.IsCatchableExceptionType(e))
{
throw;
}
throw ExprException.UnboundName(_name);
}
if (_column == null)
throw ExprException.UnboundName(_name);
_name = _column.ColumnName;
_found = true;
// add column to the dependency list, do not add duplicate columns
Debug.Assert(_column != null, "Failed to bind column " + _name);
int i;
for (i = 0; i < list.Count; i++)
{
// walk the list, check if the current column already on the list
DataColumn dataColumn = list[i];
if (_column == dataColumn)
{
break;
}
}
if (i >= list.Count)
{
list.Add(_column);
}
}