C# 클래스 DevUtils.Service.ServiceUtils

The ServiceUtils type provides an implementation of the IServiceUtils interface that provides utility methods for managing Windows services.

Base project reference: https://github.com/cjaehnen/OpenLib.Utils

상속: IServiceUtils
파일 보기 프로젝트 열기: jornfilho/.net-Dev-Utils 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CreateProcessInfo System.Diagnostics.ProcessStartInfo

공개 메소드들

메소드 설명
ChangeServiceState ( string host, string serviceName, WindowsServiceAction action ) : bool

Changes the state of the specified Windows service using the specified action.

GetServiceState ( string host, string serviceName ) : WindowsServiceState

Gets the state of the specified Windows service on the specified host.

ServiceUtils ( ) : System

Creates a new instance of the ServiceUtils class.

ServiceUtils ( IProcessUtils processUtils ) : System

Creates a new instance of the ServiceUtils class.

비공개 메소드들

메소드 설명
CreateProcessInfo ( string processArgs ) : ProcessStartInfo

Creates a ProcessStartInfo object using the specified process arguments.

메소드 상세

ChangeServiceState() 공개 메소드

Changes the state of the specified Windows service using the specified action.
public ChangeServiceState ( string host, string serviceName, WindowsServiceAction action ) : bool
host string The name of the host to connect to where the Windows service resides.
serviceName string The name of the Windows service.
action WindowsServiceAction The action in which to perform on the Windows service.
리턴 bool

GetServiceState() 공개 메소드

Gets the state of the specified Windows service on the specified host.
public GetServiceState ( string host, string serviceName ) : WindowsServiceState
host string The name of the host to connect to where the Windows service resides.
serviceName string The name of the Windows service.
리턴 WindowsServiceState

ServiceUtils() 공개 메소드

Creates a new instance of the ServiceUtils class.
public ServiceUtils ( ) : System
리턴 System

ServiceUtils() 공개 메소드

Creates a new instance of the ServiceUtils class.
public ServiceUtils ( IProcessUtils processUtils ) : System
processUtils IProcessUtils A reference to the IProcessUtils for managing processes.
리턴 System