Exemplo n.º 1
0
 /// <summary>
 /// Evaluates the specified expression.
 /// </summary>
 /// <param name="expression">The expression to evaluate.</param>
 /// <returns>Value of the expression.</returns>
 public virtual QueryValue Visit(LinqAllExpression expression)
 {
     return(this.EvaluateQueryMethodWithLambdaExpression <QueryScalarValue>(
                expression,
                null,
                (c, lambda) => c.All(lambda)));
 }
Exemplo n.º 2
0
        /// <summary>
        /// Resolves types for the specified expression.
        /// </summary>
        /// <param name="expression">The expression to resolve types for.</param>
        /// <returns>Expression with resolved types.</returns>
        public QueryExpression Visit(LinqAllExpression expression)
        {
            var source     = this.ResolveTypes(expression.Source);
            var sourceType = ValidateSourceIsACollection(source);
            var lambda     = this.ResolveLambdaTypes(expression.Lambda, sourceType);
            var boolType   = this.EvaluationStrategy.BooleanType;

            return(new LinqAllExpression(source, lambda, boolType));
        }
 /// <summary>
 /// Visits a QueryExpression tree whose root node is the LinqAllExpression.
 /// </summary>
 /// <param name="expression">The root node of the expression tree being visited.</param>
 /// <returns>Uri query string representing the expression.</returns>
 public override string Visit(LinqAllExpression expression)
 {
     return this.VisitAnyOrAll(expression, ODataConstants.AllUriOperator);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Visits a QueryExpression tree whose root node is the LinqAllExpression.
 /// </summary>
 /// <param name="expression">The root node of the expression tree being visited.</param>
 /// <returns>Uri query string representing the expression.</returns>
 public virtual string Visit(LinqAllExpression expression)
 {
     throw new TaupoNotSupportedException("Not supported");
 }
Exemplo n.º 5
0
 /// <summary>
 /// Generates System.CodeDom.CodeExpression from the given expression.
 /// </summary>
 /// <param name="expression">Expression from which System.CodeDom.CodeExpression is generated.</param>
 /// <returns>Generated System.CodeDom.CodeExpression.</returns>
 public virtual CodeExpression Visit(LinqAllExpression expression)
 {
     return(this.VisitQueryMethodWithLambdaExpression(expression, "All"));
 }
Exemplo n.º 6
0
 /// <summary>
 /// Replaces the given expression.
 /// </summary>
 /// <param name="expression">The root node of the expression tree being visited.</param>
 /// <returns>Replaced expression.</returns>
 public virtual QueryExpression Visit(LinqAllExpression expression)
 {
     return(this.VisitQueryMethodWithLambdaExpression(expression, (s, l, t) => new LinqAllExpression(s, l, t)));
 }
 /// <summary>
 /// Visits a QueryExpression tree whose root node is the LinqAllExpression.
 /// </summary>
 /// <param name="expression">The root node of the expression tree being visited.</param>
 /// <returns>Uri query string representing the expression.</returns>
 public override string Visit(LinqAllExpression expression)
 {
     return(this.VisitAnyOrAll(expression, ODataConstants.AllUriOperator));
 }