Пример #1
0
 public virtual IExpression Clone(IsOperator op)
 {
     return(new IsOperator()
     {
         Left = CloneAndReturn(op.Left),
         Right = op.Right
     }.Normalize());
 }
Пример #2
0
        public virtual void Visit(IsOperator op)
        {
            AddParenthesesIfNeeded(op, () =>
            {
                op.Left.Visit(this);
                Writer.Write(" is ");
                switch (op.Right)
                {
                case IsOperand.Null:
                case IsOperand.NotDefined:
                    Writer.Write("null");
                    break;

                default:
                    Writer.Write("not null");
                    break;
                }
            });
        }
Пример #3
0
        public void Visit(IsOperator op)
        {
            AddParenthesesIfNeeded(op, () =>
            {
                op.Left.Visit(this);
                switch (op.Right)
                {
                case IsOperand.Defined:
                case IsOperand.NotNull:
                    WriteEncoded(" ne ");
                    break;

                default:
                    WriteEncoded(" eq ");
                    break;
                }
                WriteEncoded("null");
            });
        }
        public void Visit(IsOperator op)
        {
            switch (op.Right)
            {
            case IsOperand.NotDefined:
            case IsOperand.NotNull:
                _conditionWriter.WriteStartElement("not");
                _conditionWriter.WriteStartElement("null");
                op.Left.Visit(this);
                _conditionWriter.WriteEndElement();
                _conditionWriter.WriteEndElement();
                break;

            default:
                _conditionWriter.WriteStartElement("null");
                op.Left.Visit(this);
                _conditionWriter.WriteEndElement();
                break;
            }
        }
Пример #5
0
 public virtual void Visit(IsOperator op)
 {
     op.Left.Visit(this);
 }
Пример #6
0
 void IExpressionVisitor.Visit(IsOperator op)
 {
     _clone = Clone(op);
 }