コード例 #1
0
ファイル: ILMethodCacher.cs プロジェクト: firefishes/ShipDock
        /// <summary>
        /// 获取缓存器中的方法
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public IType GetClassCache(string typeName, AppDomain appDomain)
        {
            ILRuntimeInvokeCacher cacher = GetMethodCacher(typeName);
            IType type = cacher.GetClassCache(ref appDomain, ref typeName);

            return(type);
        }
コード例 #2
0
ファイル: ILMethodCacher.cs プロジェクト: firefishes/ShipDock
        /// <summary>
        /// 获取缓存器中的类
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public ILRuntimeInvokeCacher GetMethodCacher(string type)
        {
            ILRuntimeInvokeCacher cacher;

            if (mILMethodCachers.ContainsKey(type))
            {
                cacher = mILMethodCachers[type];
            }
            else
            {
                cacher = new ILRuntimeInvokeCacher();
                mILMethodCachers[type] = cacher;
            }
            return(cacher);
        }