protected void Application_Start(object sender, EventArgs e) { RafyEnvironment.Provider.IsDebuggingEnabled = HttpContext.Current.IsDebuggingEnabled; RafyEnvironment.Provider.DllRootDirectory = Path.Combine(RafyEnvironment.Provider.RootDirectory, "Bin"); RafyEnvironment.DomainPlugins.Add(new UnitTestPlugin()); var app = new DomainApp(); app.Startup(); }
private void Form1_Load(object sender, EventArgs e) { //PlatformEnvironment.Provider.IsDebuggingEnabled = ConfigurationHelper.GetAppSettingOrDefault("IsDebuggingEnabled", false); try { var app = new DomainApp(); app.Startup(); } catch (Exception ex) { MessageBox.Show(string.Format("错误:{0} \n{1}", ex.Message)); } }
private void OnBeginRequest(object sender, EventArgs e) { if (!_webAppStarted) { lock (_lock) { if (!_webAppStarted) { _app.Startup(); _context.Disposed += (oo, ee) => { _app.NotifyExit(); }; _webAppStarted = true; } } } }