//从配置文件中获得LocalServiceDLL列表 GeneralXU 07-04-19
XmlEditClass xmlEditClass = new XmlEditClass(Application.StartupPath + @"/test.xml", XmlEditClass.enumXmlPathType.AbsolutePath);
Hashtable hashtable = new Hashtable();
hashtable = xmlEditClass.getAllChildNodesInfo("LocalServiceNode");
foreach (DictionaryEntry de in hashtable)
{
//增加一个External Interface class 的引用 GeneralXu 07-04-19
typeProvider.AddAssemblyReference(Application.StartupPath + @"/"+de.Value.ToString());
}
XmlEditClass xmlEditClass = new XmlEditClass(Application.StartupPath + @"/test.xml", XmlEditClass.enumXmlPathType.AbsolutePath);
Hashtable hashtable = new Hashtable();
hashtable = xmlEditClass.getAllChildNodesInfo("LocalServiceNode");
foreach (DictionaryEntry de in hashtable)
{
//增加一个External Interface class 的引用 GeneralXu 07-04-19
typeProvider.AddAssemblyReference(Application.StartupPath + @"/"+de.Value.ToString());
}
本文介绍了一种从XML配置文件中获取LocalServiceDLL列表的方法,并通过遍历这些条目来动态加载DLL。该过程涉及使用XmlEditClass类解析XML文件及利用typeProvider对象进行DLL引用的添加。

3764

被折叠的 条评论
为什么被折叠?



