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

◆ Load() [3/3]

virtual void System.Data.DataTable.Load ( IDataReader reader,
LoadOption loadOption,
FillErrorEventHandler? errorHandler )
inlinevirtualinherited

Definition at line 4377 of file DataTable.cs.

4378 {
4379 long scopeId = DataCommonEventSource.Log.EnterScope("<ds.DataTable.Load|API> {0}, loadOption={1}", ObjectID, loadOption);
4380 try
4381 {
4382 if (PrimaryKey.Length != 0 || !(reader is DataTableReader dataTableReader) || dataTableReader.CurrentDataTable != this)
4383 {
4386 loadAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
4387 if (errorHandler != null)
4388 {
4390 }
4391 loadAdapter.FillFromReader(new DataTable[1] { this }, reader, 0, 0);
4392 if (!reader.IsClosed && !reader.NextResult())
4393 {
4394 reader.Close();
4395 }
4396 }
4397 }
4398 finally
4399 {
4400 DataCommonEventSource.Log.ExitScope(scopeId);
4401 }
4402 }
DataColumn[] PrimaryKey
Definition DataTable.cs:607

References System.Data.IDataReader.Close(), System.Runtime.Serialization.Dictionary, System.Data.IDataReader.IsClosed, System.Data.DataCommonEventSource.Log, System.Data.IDataReader.NextResult(), System.Data.DataTable.ObjectID, and System.Data.DataTable.PrimaryKey.