private MergeTable ( |
||
src | ||
Результат | void |
public void Merge(DataTable table, bool preserveChanges, MissingSchemaAction missingSchemaAction) { IntPtr hscp; Bid.ScopeEnter(out hscp, "<ds.DataTable.Merge|API> %d#, table=%d, preserveChanges=%d{bool}, missingSchemaAction=%d{ds.MissingSchemaAction}\n", ObjectID, (table != null) ? table.ObjectID : 0, preserveChanges, (int)missingSchemaAction); try{ if (table == null) throw ExceptionBuilder.ArgumentNull("table"); switch(missingSchemaAction) { // @perfnote: Enum.IsDefined case MissingSchemaAction.Add: case MissingSchemaAction.Ignore: case MissingSchemaAction.Error: case MissingSchemaAction.AddWithKey: Merger merger = new Merger(this, preserveChanges, missingSchemaAction); merger.MergeTable(table); break; default: throw Common.ADP.InvalidMissingSchemaAction(missingSchemaAction); } } finally{ Bid.ScopeLeave(ref hscp); } }
public void Merge(DataTable table, bool preserveChanges, MissingSchemaAction missingSchemaAction) { long logScopeId = DataCommonEventSource.Log.EnterScope("<ds.DataTable.Merge|API> {0}, table={1}, preserveChanges={2}, missingSchemaAction={3}", ObjectID, (table != null) ? table.ObjectID : 0, preserveChanges, missingSchemaAction); try { if (table == null) { throw ExceptionBuilder.ArgumentNull(nameof(table)); } switch (missingSchemaAction) { case MissingSchemaAction.Add: case MissingSchemaAction.Ignore: case MissingSchemaAction.Error: case MissingSchemaAction.AddWithKey: Merger merger = new Merger(this, preserveChanges, missingSchemaAction); merger.MergeTable(table); break; default: throw ADP.InvalidMissingSchemaAction(missingSchemaAction); } } finally { DataCommonEventSource.Log.ExitScope(logScopeId); } }