Пример #1
0
        public Delegate GetDelegate(ThreadContext context, Type deleType, IMethod method)
        {
            Delegate dele = null;

            if (!Delegates.TryGetValue(method, out dele))
            {
                dele = Delegate_Binder.MakeDelegate(deleType, this, method);
                Delegates[method] = dele;
                //需要从Delegate转换成实际类型赋值的帮助类
            }
            return(dele);
        }
        public Delegate GetDelegate(ThreadContext context, Type deleType, IMethod method)
        {
            Delegate @delegate = null;
            bool     flag      = !this.Delegates.TryGetValue(method, out @delegate);

            if (flag)
            {
                @delegate = Delegate_Binder.MakeDelegate(deleType, this, method);
                this.Delegates[method] = @delegate;
            }
            return(@delegate);
        }