/// <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(LinqConcatExpression expression) { CodeExpression outer = this.GenerateCode(expression.Outer); CodeExpression inner = this.GenerateCode(expression.Inner); return(outer.Call("Concat", inner)); }
/// <summary> /// Evaluates the specified expression. /// </summary> /// <param name="expression">The expression to evaluate.</param> /// <returns>Value of the expression.</returns> public virtual QueryValue Visit(LinqConcatExpression expression) { var outer = this.EvaluateCollection(expression.Outer); var inner = this.EvaluateCollection(expression.Inner); return(outer.Concat(inner)); }
/// <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(LinqConcatExpression expression) { var outer = this.ResolveTypes(expression.Outer); var inner = this.ResolveTypes(expression.Inner); return(new LinqConcatExpression(outer, inner, outer.ExpressionType)); }
/// <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(LinqConcatExpression expression) { QueryExpression outer = this.ReplaceExpression(expression.Outer); QueryExpression inner = this.ReplaceExpression(expression.Inner); if (this.HasChanged(expression.Outer, outer) || this.HasChanged(expression.Inner, inner)) { return(new LinqConcatExpression(outer, inner, expression.ExpressionType)); } return(expression); }
/// <summary> /// Visits a QueryExpression tree whose root node is the LinqConcatExpression. /// </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(LinqConcatExpression expression) { throw new TaupoNotSupportedException("Not supported"); }