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

◆ Evaluate() [4/4]

object System.Data.DataExpression.Evaluate ( DataRow[] rows,
DataRowVersion version )
inlinepackage

Definition at line 144 of file DataExpression.cs.

145 {
146 if (!_bound)
147 {
148 Bind(_table);
149 }
150 if (_expr != null)
151 {
152 List<int> list = new List<int>();
153 foreach (DataRow dataRow in rows)
154 {
155 if (dataRow.RowState != DataRowState.Deleted && (version != DataRowVersion.Original || dataRow._oldRecord != -1))
156 {
157 list.Add(dataRow.GetRecordFromVersion(version));
158 }
159 }
160 int[] recordNos = list.ToArray();
161 return _expr.Eval(recordNos);
162 }
163 return DBNull.Value;
164 }
void Bind(DataTable table)

References System.Data.DataExpression._bound, System.Data.DataExpression._expr, System.Data.DataExpression._table, System.Data.DataExpression.Bind(), System.Data.ExpressionNode.Eval(), System.list, and System.DBNull.Value.