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))); }
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)); }
public override Expression GetValue(FieldInfo field, MemberExpression member, ExpressionVisitor visitor, IQbservableProtocol protocol) => DuplexCallback.Create( field.DeclaringType.Name + "." + field.Name, protocol, Evaluate(member.Expression, visitor, _ => Errors.ExpressionMemberMissingLocalInstanceFormat, member.Member), field);