1 Star 0 Fork 193

comsher/ASP.NET-MVC-CMS

forked from ZKEASOFT/ASP.NET-MVC-CMS 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
PreApplicationStart.cs 973 Bytes
一键复制 编辑 原始数据 按行查看 历史
Wayne 提交于 2016-09-23 13:37 . Mark Licenses
/* http://www.zkea.net/ Copyright 2016 ZKEASOFT http://www.zkea.net/licenses */
using System;
using System.Reflection;
using System.Web.Compilation;
using System.Xml;
namespace Easy
{
/// <summary>
/// [assembly: PreApplicationStartMethod(typeof(Easy.Web.PreApplicationStart), "LoadModules")]
/// </summary>
public class PreApplicationStart
{
public static void LoadModules()
{
string dir = AppDomain.CurrentDomain.BaseDirectory + "modules.config";
var doc = new XmlDocument();
doc.Load(dir);
var nodeList = doc.SelectNodes("Assemblys/Assembly");
foreach (XmlNode item in nodeList)
{
string dllPath = AppDomain.CurrentDomain.BaseDirectory + item.Attributes.GetNamedItem("path").Value;
Assembly target = Assembly.LoadFile(dllPath);
BuildManager.AddReferencedAssembly(target);
}
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/comsher/ASP.NET-MVC-CMS.git
git@gitee.com:comsher/ASP.NET-MVC-CMS.git
comsher
ASP.NET-MVC-CMS
ASP.NET-MVC-CMS
master

搜索帮助