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

◆ AcceptRecord()

bool System.Data.Select.AcceptRecord ( int record)
inlineprivate

Definition at line 573 of file Select.cs.

574 {
576 if (dataRow == null)
577 {
578 return true;
579 }
580 DataRowVersion version = DataRowVersion.Default;
581 if (dataRow._oldRecord == record)
582 {
583 version = DataRowVersion.Original;
584 }
585 else if (dataRow._newRecord == record)
586 {
587 version = DataRowVersion.Current;
588 }
589 else if (dataRow._tempRecord == record)
590 {
591 version = DataRowVersion.Proposed;
592 }
593 object value = _linearExpression.Eval(dataRow, version);
594 try
595 {
596 return DataExpression.ToBoolean(value);
597 }
598 catch (Exception e) when (ADP.IsCatchableExceptionType(e))
599 {
600 throw ExprException.FilterConvertion(_rowFilter.Expression);
601 }
602 }
static bool IsCatchableExceptionType(Exception e)
Definition ADP.cs:790
readonly RecordManager _recordManager
Definition DataTable.cs:74
ExpressionNode _linearExpression
Definition Select.cs:35
readonly DataTable _table
Definition Select.cs:19
readonly DataExpression _rowFilter
Definition Select.cs:25

References System.Data.Select._linearExpression, System.Data.DataTable._recordManager, System.Data.Select._rowFilter, System.Data.Select._table, System.Data.ExpressionNode.Eval(), System.Data.DataExpression.Expression, System.Data.ExprException.FilterConvertion(), System.Data.Common.ADP.IsCatchableExceptionType(), System.Data.DataExpression.ToBoolean(), and System.value.

Referenced by System.Data.Select.GetLinearFilteredRecords(), and System.Data.Select.GetLinearFilteredRows().