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

◆ SetOldRecord()

void System.Data.DataTable.SetOldRecord ( DataRow row,
int proposedRecord )
inlinepackageinherited

Definition at line 3948 of file DataTable.cs.

3949 {
3950 if (!_inDataLoad)
3951 {
3952 row.CheckInTable();
3954 }
3955 if (proposedRecord == row._oldRecord)
3956 {
3957 return;
3958 }
3959 int record = row._oldRecord;
3960 try
3961 {
3962 if (LiveIndexes.Count != 0)
3963 {
3964 if (-1 == record && -1 != proposedRecord && -1 != row._newRecord && proposedRecord != row._newRecord)
3965 {
3966 record = row._newRecord;
3967 }
3968 DataViewRowState recordState = row.GetRecordState(record);
3969 DataViewRowState recordState2 = row.GetRecordState(proposedRecord);
3971 if (proposedRecord != -1)
3972 {
3974 }
3975 DataViewRowState recordState3 = row.GetRecordState(record);
3976 DataViewRowState recordState4 = row.GetRecordState(proposedRecord);
3978 }
3979 else
3980 {
3982 if (proposedRecord != -1)
3983 {
3985 }
3986 }
3987 }
3988 finally
3989 {
3990 if (record != -1 && record != row._tempRecord && record != row._oldRecord && record != row._newRecord)
3991 {
3993 }
3994 if (row.RowState == DataRowState.Detached && row.rowID != -1)
3995 {
3996 RemoveRow(row, check: false);
3997 }
3998 }
3999 }
void CheckNotModifying(DataRow row)
void FreeRecord(ref int record)
void RecordStateChanged(int record, DataViewRowState oldState, DataViewRowState newState)
readonly RecordManager _recordManager
Definition DataTable.cs:74
void RemoveRow(DataRow row, bool check)
List< Index > LiveIndexes
Definition DataTable.cs:269

References System.Data.DataTable._inDataLoad, System.Data.DataTable._recordManager, System.Data.DataTable.CheckNotModifying(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Runtime.Serialization.Dictionary, System.Data.DataTable.FreeRecord(), System.Data.DataTable.LiveIndexes, System.Data.DataTable.RecordStateChanged(), and System.Data.DataTable.RemoveRow().

Referenced by System.Data.DataTable.CommitRow(), System.Data.DataTable.LoadRow(), System.Data.DataRow.SetAdded(), System.Data.DataTable.SetDataRowWithLoadOption(), and System.Data.DataTable.SetMergeRecords().