Esempio n. 1
0
        /// <summary>
        /// 创建插件实例
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public IEntityPlugin GetInstance(EntityPlugin entity)
        {
            IEntityPlugin _instance = null;

            if (_entityPluginFileProvider.LoadAssembly(entity))
            {
                _instance = (IEntityPlugin)_serviceResolver.ResolveUnregistered(Type.GetType(entity.ClassName, false, true));
            }
            return(_instance);
        }