Пример #1
0
        public override Expression Invoke(MethodCallExpression call, ExpressionVisitor visitor, QbservableProtocol protocol)
        {
            object instance;

            if (call.Method.ReturnType == typeof(void))
            {
                instance = null;
            }
            else
            {
                instance = Evaluate(call.Object, visitor, Errors.ExpressionCallMissingLocalInstanceFormat, call.Method);
            }

            return(DuplexCallback.Create(protocol, instance, call.Method, visitor.Visit(call.Arguments)));
        }
Пример #2
0
        public override Expression GetValue(FieldInfo field, MemberExpression member, ExpressionVisitor visitor, QbservableProtocol protocol)
        {
            object instance = Evaluate(member.Expression, visitor, Errors.ExpressionMemberMissingLocalInstanceFormat, member.Member);

            return(DuplexCallback.Create(protocol, instance, field));
        }