Exemple #1
0
        public override string Visit()
        {
            var left = VisitorBase.CreateFromExpression(this.node.Left, VisitorOption.Left);

            this.builder.Append(left.Visit());

            this.builder.Append(Operator());

            var right = VisitorBase.CreateFromExpression(this.node.Right, VisitorOption.Right);

            this.builder.Append(right.Visit());

            return(this.builder.ToString());
        }
        public override string Visit()
        {
            foreach (var argumentExpression in node.Parameters)
            {
                var argumentVisitor = VisitorBase.CreateFromExpression(argumentExpression);
                this.builder.Append(argumentVisitor.Visit());
            }
            var bodyVisitor = VisitorBase.CreateFromExpression(node.Body);

            this.builder.Append(bodyVisitor.Visit());
            if (this.builder.Length > 0)
            {
                this.builder.Insert(0, "?");
            }
            return(Uri.EscapeUriString(this.builder.ToString()));
        }