public new void Visit(Expression expr_) { Type expType = expr_.GetType(); Type type_ = expr_.GetType().BaseType; ExpressionType ndType = expr_.NodeType; if (ndType == ExpressionType.AndAlso) { Visit(((BinaryExpression)expr_).Left); cb.And(); Visit(((BinaryExpression)expr_).Right); } if (ndType == ExpressionType.OrElse) { Visit(((BinaryExpression)expr_).Left); cb.Or(); Visit(((BinaryExpression)expr_).Right); } if (ndType == ExpressionType.Equal) { Visit(((BinaryExpression)expr_).Left); cb.EqualSign(); Visit(((BinaryExpression)expr_).Right); } if (ndType == ExpressionType.NotEqual) { Visit(((BinaryExpression)expr_).Left); cb.NotEqual(); Visit(((BinaryExpression)expr_).Right); } if (ndType == ExpressionType.GreaterThan) { Visit(((BinaryExpression)expr_).Left); cb.GreaterThan(); Visit(((BinaryExpression)expr_).Right); } if (ndType == ExpressionType.LessThan) { Visit(((BinaryExpression)expr_).Left); cb.LessThan(); Visit(((BinaryExpression)expr_).Right); } if (ndType == ExpressionType.GreaterThanOrEqual) { Visit(((BinaryExpression)expr_).Left); cb.GreaterOrEqualThan(); Visit(((BinaryExpression)expr_).Right); } if (ndType == ExpressionType.LessThanOrEqual) { Visit(((BinaryExpression)expr_).Left); cb.LessOrEqualThan(); Visit(((BinaryExpression)expr_).Right); } if (ndType == ExpressionType.Constant) { VisitConstant((ConstantExpression)expr_); StackToStringBuilder(); } if (ndType == ExpressionType.MemberAccess) { VisitMember((MemberExpression)expr_); StackToStringBuilder(cb.Dot); } if (ndType == ExpressionType.MemberInit) { VisitMemberInit((MemberInitExpression)expr_); StackToStringBuilder(cb.Comma); } if (ndType == ExpressionType.Convert) { VisitUnary((UnaryExpression)expr_); StackToStringBuilder(); } //StackToStringBuilder(); }
public CommandBuilder And() { cb.Gap(); cb.And(); return(this); }