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

◆ Load() [1/3]

virtual void System.Data.DataSet.Load ( IDataReader reader,
LoadOption loadOption,
FillErrorEventHandler? errorHandler,
params DataTable[] tables )
inlinevirtual

Definition at line 2967 of file DataSet.cs.

2968 {
2969 long scopeId = DataCommonEventSource.Log.EnterScope("<ds.DataSet.Load|API> reader, loadOption={0}", loadOption);
2970 try
2971 {
2972 foreach (DataTable dataTable in tables)
2973 {
2974 ADP.CheckArgumentNull(dataTable, "tables");
2975 if (dataTable.DataSet != this)
2976 {
2977 throw ExceptionBuilder.TableNotInTheDataSet(dataTable.TableName);
2978 }
2979 }
2982 loadAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
2983 if (errorHandler != null)
2984 {
2986 }
2987 loadAdapter.FillFromReader(tables, reader, 0, 0);
2988 if (!reader.IsClosed && !reader.NextResult())
2989 {
2990 reader.Close();
2991 }
2992 }
2993 finally
2994 {
2995 DataCommonEventSource.Log.ExitScope(scopeId);
2996 }
2997 }
static void CheckArgumentNull([NotNull] object value, string parameterName)
Definition ADP.cs:782

References System.Data.Common.ADP.CheckArgumentNull(), System.Data.IDataReader.Close(), System.Runtime.Serialization.Dictionary, System.Data.IDataReader.IsClosed, System.Data.DataCommonEventSource.Log, System.Data.IDataReader.NextResult(), and System.Data.ExceptionBuilder.TableNotInTheDataSet().

Referenced by System.Data.DataSet.Load(), and System.Data.DataSet.Load().