private void LaunchServer() { using (ConsoleEventHandler handler = new ConsoleEventHandler()) { handler.OnConsoleEvent += new EventHandler(HandleControlEvent); using (server = serverFactory.Create(args.UseRemoting, args.ConfigFile)) { if (args.Project == null) { server.Start(); server.WaitForExit(); } else { // Force the build ValidateResponse( server.ForceBuild( new ProjectRequest(SecurityOverride.SessionIdentifier, args.Project))); // Tell the server to stop as soon as the build has finished and then wait for it ValidateResponse( server.Stop( new ProjectRequest(SecurityOverride.SessionIdentifier, args.Project))); server.WaitForExit( new ProjectRequest(SecurityOverride.SessionIdentifier, args.Project)); } } } }
private void LaunchServer() { using (ConsoleEventHandler handler = new ConsoleEventHandler()) { handler.OnConsoleEvent += new EventHandler(HandleControlEvent); using (server = _serverFactory.Create(_parser.UseRemoting, _parser.ConfigFile)) { if (_parser.Project == null) { server.Start(); server.WaitForExit(); } else { server.ForceBuild(_parser.Project, null); server.WaitForExit(_parser.Project); } } } }
private void LaunchServer() { using (ConsoleEventHandler handler = new ConsoleEventHandler()) { handler.OnConsoleEvent += new EventHandler(HandleControlEvent); using (server = _serverFactory.Create(_parser.UseRemoting, _parser.ConfigFile)) { if (_parser.Project == null) { server.Start(); server.WaitForExit(); } else { server.ForceBuild(_parser.Project, null); server.WaitForExit(_parser.Project); } } } }
private void LaunchServer() { using (ConsoleEventHandler handler = new ConsoleEventHandler()) { handler.OnConsoleEvent += new EventHandler(HandleControlEvent); using (server = serverFactory.Create(args.UseRemoting, args.ConfigFile)) { if (args.Project == null) { server.Start(); server.WaitForExit(); } else { // Force the build ValidateResponse( server.ForceBuild( new ProjectRequest(null, args.Project))); // Tell the server to stop as soon as the build has finished and then wait for it ValidateResponse( server.Stop( new ProjectRequest(null, args.Project))); server.WaitForExit( new ProjectRequest(null, args.Project)); } } } }