public override AbstractController CreateController(string pluginname, string controllername) { string pname = pluginname; string cname = controllername; ModulePlugin mp; WcfControllerAttributeInfo wattr = AppPluginManage.GetPluginWcfControllerAttributeInfo(pname, cname, out mp); WcfServerController iController = (WcfServerController)EFWCoreLib.CoreFrame.Business.FactoryModel.GetObject(wattr.wcfControllerType, mp.database, mp.container, mp.cache, mp.plugin.name, null); iController.BindDb(mp.database, mp.container, mp.cache, mp.plugin.name); iController.requestData = null; iController.responseData = null; return(iController); }
public static WcfServerController CreateController(string controllername) { string[] names = controllername.Split(new char[] { '@' }); if (names.Length != 2) { throw new Exception("控制器名称错误!"); } string pluginname = names[0]; string cname = names[1]; ModulePlugin mp; WcfControllerAttributeInfo wattr = AppPluginManage.GetPluginWcfControllerAttributeInfo(pluginname, cname, out mp); //WcfServerController iController = wattr.wcfController as WcfServerController; WcfServerController iController = (WcfServerController)EFWCoreLib.CoreFrame.Business.FactoryModel.GetObject(wattr.wcfControllerType, mp.database, mp.container, mp.cache, mp.plugin.name, null); iController.BindDb(mp.database, mp.container, mp.cache, mp.plugin.name); iController.ParamJsonData = null; iController.ClientInfo = null; return(iController); }