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)); } } } }
public void Stop(string reason) { // Since there may be a race condition around stopping the runner, check if it should be stopped // within a lock statement bool stopRunner = false; lock (lockObject) { if (!isStopping) { stopRunner = true; isStopping = true; } } if (stopRunner) { // Perform the actual stop Log.Info("Stopping service: " + reason); server.Stop(); server.WaitForExit(); Log.Debug("Service has been stopped"); } }
public void Stop() { _server.Stop(); }
/// <summary> /// Stops this instance. /// </summary> /// <remarks></remarks> public void Stop() { server.Stop(); server.WaitForExit(); }
protected override void OnPause() { server.Stop(); }
public void Stop() { cruiseServer.Stop(); }
/// <summary> /// Requests all started projects within the CruiseControl.NET server to stop /// </summary> public virtual void Stop() { server.Stop(); }
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)); } } } }
/// <summary> /// Stops the specified project. /// </summary> /// <param name="project">The project.</param> /// <remarks></remarks> public void Stop(string project) { Response resp = cruiseServer.Stop(GenerateProjectRequest(project)); ValidateResponse(resp); }