コード例 #1
0
        /// <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>
        public static void Stop(TimeSpan timeToWait, bool terminateOnFailure)
        {
            var service = new WindowsService()
            {
                Name = "chef-client", TerminateOnFailure = terminateOnFailure, TimeToWait = timeToWait
            };

            service.Stop();
        }
コード例 #2
0
 /// <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>
 public static void Stop(TimeSpan timeToWait, bool terminateOnFailure)
 {
     var service = new WindowsService() { Name = "chef-client", TerminateOnFailure = terminateOnFailure, TimeToWait = timeToWait };
     service.Stop();
 }