private void BaseAdd(DataTable table)
{
if (table == null)
{
throw ExceptionBuilder.ArgumentNull("table");
}
if (table.DataSet == this.dataSet)
{
throw ExceptionBuilder.TableAlreadyInTheDataSet();
}
if (table.DataSet != null)
{
throw ExceptionBuilder.TableAlreadyInOtherDataSet();
}
if (table.TableName.Length == 0)
{
table.TableName = this.AssignName();
}
else
{
if ((base.NamesEqual(table.TableName, this.dataSet.DataSetName, false, this.dataSet.Locale) != 0) && !table.fNestedInDataset)
{
throw ExceptionBuilder.DatasetConflictingName(this.dataSet.DataSetName);
}
this.RegisterName(table.TableName, table.Namespace);
}
table.SetDataSet(this.dataSet);
}