public override MetaObject BindInvokeMember(InvokeMemberBinder binder, MetaObject[] args) { ContractUtils.RequiresNotNull(binder, "binder"); if (args.Any(arg => ComBinderHelpers.IsStrongBoxArg(arg))) { return ComBinderHelpers.RewriteStrongBoxAsRef(binder, this, args); } ComMethodDesc methodDesc; if (_wrapperType.Funcs.TryGetValue(binder.Name, out methodDesc) || _self.TryGetMemberMethodExplicit(binder.Name, out methodDesc)) { return new ComInvokeBinder( binder.Arguments, args, IDispatchRestriction(), Expression.Constant(methodDesc), Expression.Property( Expression.Convert(Expression, typeof(IDispatchComObject)), typeof(IDispatchComObject).GetProperty("DispatchObject") ), methodDesc ).Invoke(); } return base.BindInvokeMember(binder, args); }
public static bool TryBindInvokeMember(InvokeMemberBinder binder, ref MetaObject instance, MetaObject[] args) { if (TryGetMetaObject(ref instance)) { instance = instance.BindInvokeMember(binder, args); return true; } return false; }
public override MetaObject BindInvokeMember(InvokeMemberBinder binder, MetaObject[] args) { ContractUtils.RequiresNotNull(binder, "binder"); return binder.FallbackInvokeMember(UnwrapSelf(), args); }
public override MetaObject/*!*/ BindInvokeMember(InvokeMemberBinder/*!*/ binder, params MetaObject/*!*/[]/*!*/ args) { var self = (RubyClass)Value; return RubyInvokeMemberBinder.TryBind(self.Context, binder, this, args) ?? binder.FallbackInvokeMember(this, args); }
public override bool Equals(object obj) { InvokeMemberBinder ca = obj as InvokeMemberBinder; return(ca != null && ca._name == _name && ca._ignoreCase == _ignoreCase && ca._arguments.ListEquals(_arguments)); }
public virtual MetaObject BindInvokeMember(InvokeMemberBinder binder, MetaObject[] args) { ContractUtils.RequiresNotNull(binder, "binder"); return(binder.FallbackInvokeMember(this, args)); }
public virtual bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result) { throw new NotSupportedException(); }
public override MetaObject BindInvokeMember(InvokeMemberBinder binder, MetaObject[] args) { if (IsOverridden("TryInvokeMember")) { return CallMethodWithResult("TryInvokeMember", binder, GetArgArray(args), (e) => binder.FallbackInvokeMember(this, args, e)); } return base.BindInvokeMember(binder, args); }
public override MetaObject BindInvokeMember(InvokeMemberBinder binder, MetaObject[] args) { ContractUtils.RequiresNotNull(binder, "binder"); return binder.Defer(args.AddFirst(WrapSelf())); }
public virtual MetaObject BindInvokeMember(InvokeMemberBinder binder, MetaObject[] args) { ContractUtils.RequiresNotNull(binder, "binder"); return binder.FallbackInvokeMember(this, args); }