Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 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));
     }
 }
Ejemplo n.º 3
0
        private void OnBeginRequest(object sender, EventArgs e)
        {
            if (!_webAppStarted)
            {
                lock (_lock)
                {
                    if (!_webAppStarted)
                    {
                        _app.Startup();

                        _context.Disposed += (oo, ee) => { _app.NotifyExit(); };

                        _webAppStarted = true;
                    }
                }
            }
        }