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

◆ CompareRecords()

int System.Data.Index.CompareRecords ( int record1,
int record2 )
inlineprivate

Definition at line 264 of file Index.cs.

265 {
266 if (_comparison != null)
267 {
269 }
270 if (_indexFields.Length != 0)
271 {
272 for (int i = 0; i < _indexFields.Length; i++)
273 {
275 if (num != 0)
276 {
277 if (!_indexFields[i].IsDescending)
278 {
279 return num;
280 }
281 return -num;
282 }
283 }
284 return 0;
285 }
288 DataRow row = dataRow;
289 DataRow row2 = dataRow2;
290 return _table.Rows.IndexOf(row).CompareTo(_table.Rows.IndexOf(row2));
291 }
int Compare(int record1, int record2)
DataRowCollection Rows
Definition DataTable.cs:701
readonly RecordManager _recordManager
Definition DataTable.cs:74
int CompareDataRows(int record1, int record2)
Definition Index.cs:293
readonly IndexField[] _indexFields
Definition Index.cs:34
readonly DataTable _table
Definition Index.cs:32
readonly Comparison< DataRow > _comparison
Definition Index.cs:36
readonly DataColumn Column
Definition IndexField.cs:7

References System.Data.Index._comparison, System.Data.Index._indexFields, System.Data.DataTable._recordManager, System.Data.Index._table, System.Data.IndexField.Column, System.Data.DataColumn.Compare(), System.Data.Index.CompareDataRows(), System.Data.DataRowCollection.IndexOf(), and System.Data.DataTable.Rows.

Referenced by System.Data.Index.IndexTree.CompareNode(), System.Data.Index.FindNodeByKeyRecord(), and System.Data.Index.RecordStateChanged().