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

◆ Index() [3/3]

System.Data.Index.Index ( DataTable table,
IndexField[] indexFields,
Comparison< DataRow > comparison,
DataViewRowState recordStates,
IFilter rowFilter )
inlineprivate

Definition at line 108 of file Index.cs.

109 {
110 DataCommonEventSource.Log.Trace("<ds.Index.Index|API> {0}, table={1}, recordStates={2}", ObjectID, table?.ObjectID ?? 0, recordStates);
111 if (((uint)recordStates & 0xFFFFFFC1u) != 0)
112 {
113 throw ExceptionBuilder.RecordStateRange();
114 }
115 _table = table;
116 _listeners = new Listeners<DataViewListener>(ObjectID, (DataViewListener listener) => listener != null);
120 _isSharable = rowFilter == null && comparison == null;
121 if (rowFilter != null)
122 {
123 _rowFilter = new WeakReference(rowFilter);
124 if (rowFilter is DataExpression dataExpression)
125 {
126 _hasRemoteAggregate = dataExpression.HasRemoteAggregate();
127 }
128 }
130 }
void InitRecords(IFilter filter)
Definition Index.cs:634
readonly bool _hasRemoteAggregate
Definition Index.cs:54
readonly IndexField[] _indexFields
Definition Index.cs:34
readonly DataViewRowState _recordStates
Definition Index.cs:38
readonly DataTable _table
Definition Index.cs:32
readonly Comparison< DataRow > _comparison
Definition Index.cs:36
readonly WeakReference _rowFilter
Definition Index.cs:40
readonly Listeners< DataViewListener > _listeners
Definition Index.cs:48
readonly bool _isSharable
Definition Index.cs:52

References System.Data.Index._comparison, System.Data.Index._hasRemoteAggregate, System.Data.Index._indexFields, System.Data.Index._isSharable, System.Data.Index._listeners, System.Data.Index._recordStates, System.Data.Index._rowFilter, System.Data.Index._table, System.comparison, System.Data.Index.InitRecords(), System.Data.DataCommonEventSource.Log, System.Data.Index.ObjectID, and System.Data.ExceptionBuilder.RecordStateRange().