Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ FillSchema() [7/7]

virtual ? DataTable System.Data.Common.DbDataAdapter.FillSchema ( DataTable dataTable,
SchemaType schemaType,
IDbCommand command,
CommandBehavior behavior )
inlineprotectedvirtual

Definition at line 353 of file DbDataAdapter.cs.

354 {
355 long scopeId = DataCommonEventSource.Log.EnterScope("<comm.DbDataAdapter.FillSchema|API> {0}, dataTable, schemaType, command, behavior={1}", base.ObjectID, behavior);
356 try
357 {
358 if (dataTable == null)
359 {
360 throw ADP.ArgumentNull("dataTable");
361 }
362 if (SchemaType.Source != schemaType && SchemaType.Mapped != schemaType)
363 {
364 throw ADP.InvalidSchemaType(schemaType);
365 }
366 if (command == null)
367 {
368 throw ADP.MissingSelectCommand("FillSchema");
369 }
370 string text = dataTable.TableName;
371 int num = IndexOfDataSetTable(text);
372 if (-1 != num)
373 {
374 text = base.TableMappings[num].SourceTable;
375 }
376 return (DataTable)FillSchemaInternal(null, dataTable, schemaType, command, text, behavior | CommandBehavior.SingleResult);
377 }
378 finally
379 {
380 DataCommonEventSource.Log.ExitScope(scopeId);
381 }
382 }
int IndexOfDataSetTable(string dataSetTable)
object FillSchemaInternal(DataSet dataset, DataTable datatable, SchemaType schemaType, IDbCommand command, string srcTable, CommandBehavior behavior)

References System.Data.Common.ADP.ArgumentNull(), System.Data.Common.DbDataAdapter.FillSchemaInternal(), System.Data.Common.DataAdapter.IndexOfDataSetTable(), System.Data.Common.ADP.InvalidSchemaType(), System.Data.DataCommonEventSource.Log, System.Data.Common.ADP.MissingSelectCommand(), and System.text.