예제 #1
0
        public override DynamicMetaObject /*!*/ FallbackInvoke(DynamicMetaObject target, DynamicMetaObject /*!*/[] /*!*/ args, DynamicMetaObject errorSuggestion)
        {
            if (target.Value is IDynamicMetaObjectProvider && errorSuggestion == null)
            {
                // try creating an instance...
                return(target.BindCreateInstance(
                           _context.Create(this, CallInfo),
                           args
                           ));
            }

#if FEATURE_COM
            DynamicMetaObject com;
            if (Microsoft.Scripting.ComInterop.ComBinder.TryBindInvoke(this, target, BindingHelpers.GetComArguments(args), out com))
            {
                return(com);
            }
#endif

            return(InvokeFallback(target, args, BindingHelpers.CallInfoToSignature(CallInfo), errorSuggestion));
        }