modules/InstallationSDK.ChefClientInstaller/code/ClientService.cs
/// <summary>
/// Stop the Chef Client windows service.
/// </summary>
/// <param name="timeToWait">Wait time for operation to complete.</param>
/// <param name="terminateOnFailure">Should the process terminate the processes of the Client service if it failes to stop in alloted time.</param>
Stop the Chef Client windows service.
Stop the Chef Client windows service .
public static void Stop(TimeSpan timeToWait, bool terminateOnFailure)
        {
            var service = new WindowsService() { Name = "chef-client", TerminateOnFailure = terminateOnFailure, TimeToWait = timeToWait };
            service.Stop();
        }
public static void Stop ( TimeSpan timeToWait , bool terminateOnFailure ) { var service = new WindowsService ( ) { Name = " " , TerminateOnFailure = terminateOnFailure , TimeToWait = timeToWait } ; service . Stop ( ) ; }
Stop the Chef Client windows service.
Stop the Chef Client windows service .
timeToWait
TimeSpan
Wait time for operation to complete.
Wait time for operation to complete .
terminateOnFailure
bool
Should the process terminate the processes of the Client service if it failes to stop in alloted time.
Should the process terminate the processes of the Client service if it failes to stop in alloted time .