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

◆ InsertRecord()

int System.Data.Index.InsertRecord ( int record,
bool fireEvent )
inlineprivate

Definition at line 690 of file Index.cs.

691 {
692 DataCommonEventSource.Log.Trace("<ds.Index.InsertRecord|INFO> {0}, record={1}, fireEvent={2}", ObjectID, record, fireEvent);
693 bool append = false;
694 if (_indexFields.Length == 0 && _table != null)
695 {
696 DataRow row = _table._recordManager[record];
698 }
699 int node = _records.InsertAt(-1, record, append);
700 _recordCount++;
702 if (fireEvent)
703 {
704 if (DoListChanged)
705 {
707 }
708 return 0;
709 }
711 }
DataRowCollection Rows
Definition DataTable.cs:701
readonly RecordManager _recordManager
Definition DataTable.cs:74
void OnListChanged(ListChangedType changedType, int newIndex, int oldIndex)
Definition Index.cs:731
readonly IndexField[] _indexFields
Definition Index.cs:34
readonly DataTable _table
Definition Index.cs:32
bool DoListChanged
Definition Index.cs:77
void MaintainDataView(ListChangedType changedType, int record, bool trackAddRemove)
Definition Index.cs:756
IndexTree _records
Definition Index.cs:42
int InsertAt(int position, K item, bool append)
Definition RBTree.cs:1262
int GetIndexByNode(int node)
Definition RBTree.cs:1087

References System.Data.Index._indexFields, System.Data.Index._recordCount, System.Data.DataTable._recordManager, System.Data.Index._records, System.Data.Index._table, System.Data.DataRowCollection.Count, System.Data.Index.DoListChanged, System.Data.RBTree< K >.GetIndexByNode(), System.Data.DataRowCollection.IndexOf(), System.Data.RBTree< K >.InsertAt(), System.Data.DataCommonEventSource.Log, System.Data.Index.MaintainDataView(), System.Data.Index.ObjectID, System.Data.Index.OnListChanged(), and System.Data.DataTable.Rows.

Referenced by System.Data.Index.ApplyChangeAction(), and System.Data.Index.InsertRecordToIndex().