private void BeginUnary(DbUnaryExpression e) { Begin(e); Begin("Argument"); Dump(e.Argument); End("Argument"); }
private void VisitUnary(DbUnaryExpression expr) { VisitExprKind(expr.ExpressionKind); _key.Append('('); expr.Argument.Accept(this); _key.Append(')'); }
private void VisitUnary(DbUnaryExpression expr) { this.VisitExprKind(expr.ExpressionKind); this._key.Append('('); expr.Argument.Accept((DbExpressionVisitor)this); this._key.Append(')'); }
private void BeginUnary(DbUnaryExpression e) { this.Begin((DbExpression)e); this.Begin("Argument"); this.Dump(e.Argument); this.End("Argument"); }
/// <inheritdoc/> public override void Visit(DbUnaryExpression e) { SqlBuilder.Append("("); SqlBuilder.Append(UnaryExpressionMappers[e.Kind]); e.Operand.Accept(this); SqlBuilder.Append(")"); }
//internal virtual void VisitRelatedEntityReference(DbRelatedEntityRef relatedEntityRef) //{ // VisitExpression(relatedEntityRef.TargetEntityReference); //} //internal virtual void VisitRelatedEntityReferenceList(IList<DbRelatedEntityRef> relatedEntityReferences) //{ // for (int i = 0; i < relatedEntityReferences.Count; i++) // { // VisitRelatedEntityReference(relatedEntityReferences[i]); // } //} protected virtual void VisitUnaryExpression(DbUnaryExpression expression) { if (expression == null) { throw new ArgumentException("expression"); } VisitExpression(expression.Argument); }
private void VisitCastOrTreat(DbUnaryExpression e) { VisitExprKind(e.ExpressionKind); _key.Append('('); e.Argument.Accept(this); _key.Append(":"); _key.Append(e.ResultType.Identity); _key.Append(')'); }
private TreeNode VisitUnary(DbUnaryExpression expr, bool appendType) { var retInfo = NodeFromExpression(expr); if (appendType) { AppendTypeSpecifier(retInfo, expr.ResultType); } retInfo.Children.Add(VisitExpression(expr.Argument)); return(retInfo); }
private TreeNode VisitUnary(DbUnaryExpression expr, bool appendType) { TreeNode node = ExpressionPrinter.PrinterVisitor.NodeFromExpression((DbExpression)expr); if (appendType) { ExpressionPrinter.PrinterVisitor.AppendTypeSpecifier(node, expr.ResultType); } node.Children.Add(this.VisitExpression(expr.Argument)); return(node); }
private TreeNode VisitCastOrTreat(string op, DbUnaryExpression e) { TreeNode node1 = this.VisitExpression(e.Argument); TreeNode node2; if (node1.Children.Count == 0) { node1.Text.Insert(0, op); node1.Text.Insert(op.Length, '('); node1.Text.Append(" As "); ExpressionPrinter.PrinterVisitor.AppendType(node1, e.ResultType); node1.Text.Append(")"); node2 = node1; } else { node2 = new TreeNode(op, new TreeNode[0]); ExpressionPrinter.PrinterVisitor.AppendTypeSpecifier(node2, e.ResultType); node2.Children.Add(node1); } return(node2); }
private TreeNode VisitCastOrTreat(string op, DbUnaryExpression e) { TreeNode retInfo = null; var argInfo = VisitExpression(e.Argument); if (0 == argInfo.Children.Count) { argInfo.Text.Insert(0, op); argInfo.Text.Insert(op.Length, '('); argInfo.Text.Append(" As "); AppendType(argInfo, e.ResultType); argInfo.Text.Append(")"); retInfo = argInfo; } else { retInfo = new TreeNode(op); AppendTypeSpecifier(retInfo, e.ResultType); retInfo.Children.Add(argInfo); } return(retInfo); }
/// <summary> /// Visits the <see cref="DbUnaryExpression"/>. /// </summary> /// <param name="expression">The expression.</param> /// <returns>The result.</returns> public abstract T Visit(DbUnaryExpression expression);
private void VisitCastOrTreat(DbUnaryExpression e) { VisitExprKind(e.ExpressionKind); _key.Append('('); e.Argument.Accept(this); _key.Append(":"); _key.Append(e.ResultType.Identity); _key.Append(')'); }
/// <summary> /// Convenience method to visit the specified <see cref="DbUnaryExpression" />. /// </summary> /// <param name="expression"> The DbUnaryExpression to visit. </param> /// <exception cref="ArgumentNullException"> /// <paramref name="expression" /> /// is null /// </exception> protected virtual void VisitUnaryExpression(DbUnaryExpression expression) { VisitExpression(Check.NotNull(expression, "expression").Argument); }
private void VisitUnary(DbUnaryExpression expr) { VisitExprKind(expr.ExpressionKind); _key.Append('('); expr.Argument.Accept(this); _key.Append(')'); }
private void BeginUnary(DbUnaryExpression e) { Begin(e); Begin("Argument"); Dump(e.Argument); End("Argument"); }
protected virtual void VisitUnaryExpression(DbUnaryExpression expression) { this.VisitExpression(EntityUtils.CheckArgumentNull <DbUnaryExpression>(expression, nameof(expression)).Argument); }
//internal virtual void VisitRelatedEntityReference(DbRelatedEntityRef relatedEntityRef) //{ // VisitExpression(relatedEntityRef.TargetEntityReference); //} //internal virtual void VisitRelatedEntityReferenceList(IList<DbRelatedEntityRef> relatedEntityReferences) //{ // for (int i = 0; i < relatedEntityReferences.Count; i++) // { // VisitRelatedEntityReference(relatedEntityReferences[i]); // } //} protected virtual void VisitUnaryExpression(DbUnaryExpression expression) { if (expression == null) throw new ArgumentException("expression"); VisitExpression(expression.Argument); }
private TreeNode VisitUnary(DbUnaryExpression expr) { return(this.VisitUnary(expr, false)); }
private bool VisitUnaryExpression(DbUnaryExpression expr) { return(VisitExpression(expr.Argument)); }
public static void Verify(this DbUnaryExpression expression, DbUnaryExpressionKind expectedKind, Column expectedOperand) { Assert.AreEqual(expectedKind, expression.Kind); Assert.AreEqual(expectedOperand.DbExpression, expression.Operand); }