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

◆ LoadDataRow() [2/2]

DataRow System.Data.DataTable.LoadDataRow ( object?[] values,
LoadOption loadOption )
inlineinherited

Definition at line 4173 of file DataTable.cs.

4174 {
4175 long scopeId = DataCommonEventSource.Log.EnterScope("<ds.DataTable.LoadDataRow|API> {0}, loadOption={1}", ObjectID, loadOption);
4176 try
4177 {
4178 Index searchIndex = null;
4179 if (_primaryKey != null)
4180 {
4181 if (loadOption == LoadOption.Upsert)
4182 {
4183 if (_loadIndexwithCurrentDeleted == null)
4184 {
4185 _loadIndexwithCurrentDeleted = _primaryKey.Key.GetSortIndex(DataViewRowState.CurrentRows | DataViewRowState.Deleted);
4186 if (_loadIndexwithCurrentDeleted != null)
4187 {
4189 }
4190 }
4192 }
4193 else
4194 {
4195 if (_loadIndexwithOriginalAdded == null)
4196 {
4197 _loadIndexwithOriginalAdded = _primaryKey.Key.GetSortIndex(DataViewRowState.OriginalRows | DataViewRowState.Added);
4198 if (_loadIndexwithOriginalAdded != null)
4199 {
4201 }
4202 }
4204 }
4205 }
4207 {
4209 }
4211 }
4212 finally
4213 {
4214 DataCommonEventSource.Log.ExitScope(scopeId);
4215 }
4216 }
DataRow LoadRow(object[] values, LoadOption loadOption, Index searchIndex)
UniqueConstraint _primaryKey
Definition DataTable.cs:124
Index _loadIndexwithOriginalAdded
Definition DataTable.cs:132
Index _loadIndexwithCurrentDeleted
Definition DataTable.cs:134
void AddRef()
Definition Index.cs:196
Index GetSortIndex()
Definition DataKey.cs:184

References System.Data.DataTable._inDataLoad, System.Data.DataTable._loadIndexwithCurrentDeleted, System.Data.DataTable._loadIndexwithOriginalAdded, System.Data.DataTable._primaryKey, System.Data.Index.AddRef(), System.Data.DataTable.AreIndexEventsSuspended, System.Data.DataKey.GetSortIndex(), System.Data.UniqueConstraint.Key, System.Data.DataTable.LoadRow(), System.Data.DataCommonEventSource.Log, System.Data.DataTable.ObjectID, System.Data.DataTable.SuspendIndexEvents(), and System.values.