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

◆ FillSchemaInternal()

object System.Data.Common.DbDataAdapter.FillSchemaInternal ( DataSet dataset,
DataTable datatable,
SchemaType schemaType,
IDbCommand command,
string srcTable,
CommandBehavior behavior )
inlineprivate

Definition at line 385 of file DbDataAdapter.cs.

386 {
387 object result = null;
388 bool flag = command.Connection == null;
389 try
390 {
391 IDbConnection connection = GetConnection3(this, command, "FillSchema");
393 try
394 {
395 QuietOpen(connection, out originalState);
396 using IDataReader dataReader = command.ExecuteReader(behavior | CommandBehavior.SchemaOnly | CommandBehavior.KeyInfo);
397 result = ((datatable == null) ? ((object)FillSchema(dataset, schemaType, srcTable, dataReader)) : ((object)FillSchema(datatable, schemaType, dataReader)));
398 }
399 finally
400 {
401 QuietClose(connection, originalState);
402 }
403 }
404 finally
405 {
406 if (flag)
407 {
408 command.Transaction = null;
409 command.Connection = null;
410 }
411 }
412 return result;
413 }
static IDbConnection GetConnection3(DbDataAdapter adapter, IDbCommand command, string method)
DataTable? FillSchema(DataTable dataTable, SchemaType schemaType)
static void QuietOpen(IDbConnection connection, out ConnectionState originalState)
static void QuietClose(IDbConnection connection, ConnectionState originalState)

References System.Data.Common.DbDataAdapter.FillSchema(), System.Data.Common.DbDataAdapter.GetConnection3(), System.Data.Common.DbDataAdapter.QuietClose(), and System.Data.Common.DbDataAdapter.QuietOpen().

Referenced by System.Data.Common.DbDataAdapter.FillSchema(), and System.Data.Common.DbDataAdapter.FillSchema().