Queue.Hosts.Common.ServiceManager.ServiceRunned C# (CSharp) Method

ServiceRunned() public method

public ServiceRunned ( ) : bool
return bool
        public bool ServiceRunned()
        {
            if (!ServiceInstalled())
            {
                return false;
            }

            using (ServiceController controller = new ServiceController(serviceName))
            {
                return controller.Status == ServiceControllerStatus.Running;
            }
        }