Boo.Lang.Runtime.RuntimeServices.CreateMethodDispatcher C# (CSharp) Метод

CreateMethodDispatcher() приватный статический Метод

private static CreateMethodDispatcher ( object target, string name, object args ) : Dispatcher
target object
name string
args object
Результат Dispatcher
        private static Dispatcher CreateMethodDispatcher(object target, string name, object[] args)
        {
            var duck = target as IQuackFu;
            if (null != duck)
                return (o, arguments) => ((IQuackFu) o).QuackInvoke(name, arguments);

            var type = target as Type;
            if (null != type)
                // static method
                return DoCreateMethodDispatcher(null, type, name, args);

            var targetType = target.GetType();
            if (targetType.IsCOMObject)
            {
                // COM methods cant be seen through reflection
                // so maybe the proper way to support parameter conversions
                // is indeed by creating a specific Binder object
                // which knows the boo conversion rules
                return
                    (o, arguments) => o.GetType().InvokeMember(name, InvokeBindingFlags, null, target, arguments);
            }

            return DoCreateMethodDispatcher(target, targetType, name, args);
        }
RuntimeServices