public static WcfControllerAttributeInfo GetPluginWcfControllerAttributeInfo(string pluginname, string name, out ModulePlugin mp) { mp = PluginDic[pluginname]; if (mp != null) { List <WcfControllerAttributeInfo> list = (List <WcfControllerAttributeInfo>)WcfControllerManager.GetAttributeInfo(mp.cache, mp.plugin.name); if (list.FindIndex(x => x.controllerName == name) > -1) { return(list.Find(x => x.controllerName == name)); } } return(null); //foreach (KeyValuePair<string, ModulePlugin> val in PluginDic) //{ // List<WcfControllerAttributeInfo> list = (List<WcfControllerAttributeInfo>)WcfControllerManager.GetAttributeInfo(val.Value.cache, val.Value.plugin.name); // if (list.FindIndex(x => x.controllerName == name) > -1) // { // mp = val.Value; // return list.Find(x => x.controllerName == name); // } //} //mp = null; //return null; }
public static WcfControllerAttributeInfo GetPluginWcfControllerAttributeInfo(string pluginname, string name, out ModulePlugin mp) { mp = PluginDic[pluginname]; if (mp != null) { List <WcfControllerAttributeInfo> list = (List <WcfControllerAttributeInfo>)WcfControllerManager.GetAttributeInfo(mp.cache, mp.plugin.name); if (list.FindIndex(x => x.controllerName == name) > -1) { return(list.Find(x => x.controllerName == name)); } } return(null); }