public void Init(HttpApplication context) { System.Xml.XmlDocument _document = new System.Xml.XmlDocument(); _document.Load(Xy.Tools.IO.File.foundConfigurationFile("App", Xy.AppSetting.FILE_EXT)); foreach (System.Xml.XmlNode _item in _document.GetElementsByTagName("Global")) { string _className = _item.InnerText; Type _tempCtonrlType = Type.GetType(_className, false, true); IGlobal _tempGlobal; if (_tempCtonrlType == null) { System.Reflection.Assembly asm = System.Reflection.Assembly.Load(_className.Split(',')[0]); _tempCtonrlType = asm.GetType(_className.Split(',')[1], false, true); } _tempGlobal = System.Activator.CreateInstance(_tempCtonrlType) as IGlobal; if (_tempGlobal != null) { global = _tempGlobal; } } if (global == null) { global = new EmptyGlobal(); } global.ApplicationInit(context); context.BeginRequest += new EventHandler(context_BeginRequest); context.Error += new EventHandler(context_Error); context.EndRequest += new EventHandler(context_EndRequest); _urlManager = URLManage.URLManager.GetInstance(); }
internal static URLManager GetInstance() { if (_instance == null) { _instance = new URLManager(); } return _instance; }
internal static URLManager GetInstance() { if (_instance == null) { _instance = new URLManager(); } return(_instance); }
public static void ClearCache() { _instance = null; }