Ejemplo n.º 1
0
            public override DynamicMetaObject BindInvoke(InvokeBinder binder, DynamicMetaObject[] args)
            {
                if (IsOverridden("TryInvoke"))
                {
                    return(CallMethodWithResult("TryInvoke", binder, DynamicMetaObject.GetExpressions(args), (e) => binder.FallbackInvoke(this, args, e)));
                }

                return(base.BindInvoke(binder, args));
            }
Ejemplo n.º 2
0
 /// <summary>
 /// Performs the binding of the dynamic invoke operation.
 /// </summary>
 /// <param name="binder">An instance of the <see cref="InvokeBinder"/> that represents the details of the dynamic operation.</param>
 /// <param name="args">An array of <see cref="DynamicMetaObject"/> instances - arguments to the invoke operation.</param>
 /// <returns>The new <see cref="DynamicMetaObject"/> representing the result of the binding.</returns>
 public virtual DynamicMetaObject BindInvoke(InvokeBinder binder, DynamicMetaObject[] args)
 {
     ContractUtils.RequiresNotNull(binder, "binder");
     return(binder.FallbackInvoke(this, args));
 }