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

◆ ImportRow()

void System.Data.DataTable.ImportRow ( DataRow? row)
inlineinherited

Definition at line 2916 of file DataTable.cs.

2917 {
2918 long scopeId = DataCommonEventSource.Log.EnterScope("<ds.DataTable.ImportRow|API> {0}", ObjectID);
2919 try
2920 {
2921 int num = -1;
2922 int num2 = -1;
2923 if (row == null)
2924 {
2925 return;
2926 }
2927 if (row._oldRecord != -1)
2928 {
2929 num = _recordManager.ImportRecord(row.Table, row._oldRecord);
2930 }
2931 if (row._newRecord != -1)
2932 {
2933 num2 = ((row.RowState == DataRowState.Unchanged) ? num : _recordManager.ImportRecord(row.Table, row._newRecord));
2934 }
2935 if (num == -1 && num2 == -1)
2936 {
2937 return;
2938 }
2939 DataRow dataRow = AddRecords(num, num2);
2940 if (row.HasErrors)
2941 {
2942 dataRow.RowError = row.RowError;
2943 DataColumn[] columnsInError = row.GetColumnsInError();
2944 for (int i = 0; i < columnsInError.Length; i++)
2945 {
2946 DataColumn column = dataRow.Table.Columns[columnsInError[i].ColumnName];
2947 dataRow.SetColumnError(column, row.GetColumnError(columnsInError[i]));
2948 }
2949 }
2950 }
2951 finally
2952 {
2953 DataCommonEventSource.Log.ExitScope(scopeId);
2954 }
2955 }
DataRow AddRecords(int oldRecord, int newRecord)
readonly RecordManager _recordManager
Definition DataTable.cs:74
int ImportRecord(DataTable src, int record)

References System.Data.DataTable._recordManager, System.Data.DataTable.AddRecords(), System.Runtime.Serialization.Dictionary, System.Data.RecordManager.ImportRecord(), System.Data.DataCommonEventSource.Log, and System.Data.DataTable.ObjectID.