public void Add(DataTable table)
{
long logScopeId = DataCommonEventSource.Log.EnterScope("<ds.DataTableCollection.Add|API> {0}, table={1}", ObjectID, (table != null) ? table.ObjectID : 0);
try
{
OnCollectionChanging(new CollectionChangeEventArgs(CollectionChangeAction.Add, table));
BaseAdd(table);
ArrayAdd(table);
if (table.SetLocaleValue(_dataSet.Locale, false, false) ||
table.SetCaseSensitiveValue(_dataSet.CaseSensitive, false, false))
{
table.ResetIndexes();
}
OnCollectionChanged(new CollectionChangeEventArgs(CollectionChangeAction.Add, table));
}
finally
{
DataCommonEventSource.Log.ExitScope(logScopeId);
}
}