Пример #1
0
                    public static bool IsBinary(Expression exp, out BinaryOperator op, out Expression left, out Expression right, Decoder decoder)
                    {
                        VisitorForIsBinaryExpression visitor = decoder.visitorForIsBinaryExpression;
                        bool result = Decode(exp, visitor, decoder);

                        op    = visitor.Operator;
                        left  = visitor.Left;
                        right = visitor.Right;
                        return(result);
                    }
Пример #2
0
                public Decoder(IExpressionContext <Local, Parameter, Method, Field, Type, Expression, Variable> context,
                               IDecodeMetaData <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly> decoderForMetaData)
                {
                    Contract.Requires(context != null);

                    this.context            = context;
                    this.decoderForMetaData = decoderForMetaData;

                    visitorForIsUnaryExpression  = new VisitorForIsUnaryExpression();
                    visitorForIsBinaryExpression = new VisitorForIsBinaryExpression();
                    visitorForVariablesIn        = new VisitorForVariablesIn(context);
                    visitorForValueOf            = new VisitorForValueOf();
                    visitorForSizeOf             = new VisitorForSizeOf();
                    visitorForIsNull             = new VisitorForIsNull();
                    visitorForVariable           = new VisitorForVariable();
                    visitorForIsInst             = new VisitorForIsInst();
                    visitorForUnderlyingVariable = new VisitorForUnderlyingVariable();
                    visitorForDispatch           = new VisitorForDispatch(this);
                }
Пример #3
0
 public bool IsBinaryOperator(Expression exp, out BinaryOperator op, out Expression left, out Expression right)
 {
     return(VisitorForIsBinaryExpression.IsBinary(exp, out op, out left, out right, this));
 }