예제 #1
0
 protected override ResultOperatorBase CreateResultOperator(ClauseGenerationContext clauseGenerationContext)
 {
     return(new DistinctResultOperator());
 }
예제 #2
0
 public override Expression Resolve(
     ParameterExpression inputParameter, Expression expressionToBeResolved, ClauseGenerationContext clauseGenerationContext)
 {
     // no data streams out from this node, so we cannot resolve any expressions
     throw CreateResolveNotSupportedException();
 }
        protected override ResultOperatorBase CreateResultOperator(ClauseGenerationContext clauseGenerationContext)
        {
            var castItemType = CastItemType;

            return(new CastResultOperator(castItemType));
        }
        public override Expression Resolve(ParameterExpression inputParameter, Expression expressionToBeResolved, ClauseGenerationContext clauseGenerationContext)
        {
            ArgumentUtility.CheckNotNull("inputParameter", inputParameter);
            ArgumentUtility.CheckNotNull("expressionToBeResolved", expressionToBeResolved);

            // this simply streams its input data to the output without modifying its structure, so we resolve by passing on the data to the previous node
            return(Source.Resolve(inputParameter, expressionToBeResolved, clauseGenerationContext));
        }
 protected override ResultOperatorBase CreateResultOperator(ClauseGenerationContext clauseGenerationContext)
 {
     return(new SingleResultOperator(ParsedExpression.Method.Name.EndsWith("OrDefault")));
 }
        public Expression Resolve(ParameterExpression inputParameter, Expression expressionToBeResolved, ClauseGenerationContext clauseGenerationContext)
        {
            ArgumentUtility.CheckNotNull("inputParameter", inputParameter);
            ArgumentUtility.CheckNotNull("expressionToBeResolved", expressionToBeResolved);

            // query sources resolve into references that point back to the respective clauses
            return(QuerySourceExpressionNodeUtility.ReplaceParameterWithReference(
                       this,
                       inputParameter,
                       expressionToBeResolved,
                       clauseGenerationContext));
        }