Start() public method

public Start ( ) : void
return void
Esempio n. 1
0
        private void btnStartServer_Click(object sender, EventArgs e)
        {
            _logWriter.Write(this, LogPrio.Info, "Starting " + SelectedFrameworkName + " on port 9876...");
            string appName = radRackApp.Checked ? "RackApp" : radSinatraApp.Checked ?  "Sinatra" : "Rails";

               if(radBracket.Checked)
               {
               _bracketServer = new DefaultRackServer(9876, IPAddress.Any, _logWriter);
               _bracketServer.Start(new RubyEnvironment(env => env.ApplicationRootPath = appName));
               }
               else if (radFramework.Checked)
               {
               _frameworkServer = new HttpListenerRackServer(9876);
               _frameworkServer.Start(new RubyEnvironment(env => env.ApplicationRootPath = appName));
               }

            _logWriter.Write(this, LogPrio.Info, SelectedFrameworkName + " Started!");

            btnBrowserNavigate.PerformClick();

            grpServerLib.Enabled = false;
            grpApplicationType.Enabled = false;
            btnStartServer.Enabled = false;
            btnStopServer.Enabled = true;
        }