System.Data.Select.BuildLinearExpression C# (CSharp) Method

BuildLinearExpression() private method

private BuildLinearExpression ( ) : void
return void
        private void BuildLinearExpression()
        {
            int i;
            IndexField[] fields = _index._indexFields;
            int lenId = fields.Length;
            Debug.Assert(_matchedCandidates > 0 && _matchedCandidates <= lenId, "BuildLinearExpression : Invalid Index");
            for (i = 0; i < _matchedCandidates; i++)
            {
                ColumnInfo canColumn = _candidateColumns[fields[i].Column.Ordinal];
                Debug.Assert(canColumn != null && canColumn.expr != null, "BuildLinearExpression : Must be a matched candidate");
                canColumn.flag = true;
            }
            //this is invalid assert, assumption was that all equals operator exists at the begining of candidateColumns
            // but with QFE 1704, this assumption is not true anymore
            //            Debug.Assert(matchedCandidates==1 || candidateColumns[matchedCandidates-1].equalsOperator, "BuildLinearExpression : Invalid matched candidates");
            int lenCanColumns = _candidateColumns.Length;
            for (i = 0; i < lenCanColumns; i++)
            {
                if (_candidateColumns[i] != null)
                {
                    if (!_candidateColumns[i].flag)
                    {
                        if (_candidateColumns[i].expr != null)
                        {
                            _linearExpression = (_linearExpression == null ? _candidateColumns[i].expr : new BinaryNode(_table, Operators.And, _candidateColumns[i].expr, _linearExpression));
                        }
                    }
                    else
                    {
                        _candidateColumns[i].flag = false;
                    }
                }
            }
        }