C# Class Topshelf.Runtime.Windows.WindowsHostEnvironment

Inheritance: HostEnvironment
显示文件 Open project: Topshelf/Topshelf Class Usage Examples

Public Methods

Method Description
CreateServiceHost ( HostSettings settings, ServiceHandle serviceHandle ) : Host
InstallService ( InstallHostSettings settings, Action beforeInstall, System.Action afterInstall, System.Action beforeRollback, System.Action afterRollback ) : void
IsServiceInstalled ( string serviceName ) : bool
IsServiceStopped ( string serviceName ) : bool
RunAsAdministrator ( ) : bool
SendServiceCommand ( string serviceName, int command ) : void
StartService ( string serviceName, System.TimeSpan startTimeOut ) : void
StopService ( string serviceName, System.TimeSpan stopTimeOut ) : void
UninstallService ( HostSettings settings, System.Action beforeUninstall, System.Action afterUninstall ) : void
WindowsHostEnvironment ( HostConfigurator configurator ) : System

Private Methods

Method Description
GetParent ( Process child ) : Process
IsServiceListed ( string serviceName ) : bool

Method Details

CreateServiceHost() public method

public CreateServiceHost ( HostSettings settings, ServiceHandle serviceHandle ) : Host
settings HostSettings
serviceHandle ServiceHandle
return Host

InstallService() public method

public InstallService ( InstallHostSettings settings, Action beforeInstall, System.Action afterInstall, System.Action beforeRollback, System.Action afterRollback ) : void
settings InstallHostSettings
beforeInstall Action
afterInstall System.Action
beforeRollback System.Action
afterRollback System.Action
return void

IsServiceInstalled() public method

public IsServiceInstalled ( string serviceName ) : bool
serviceName string
return bool

IsServiceStopped() public method

public IsServiceStopped ( string serviceName ) : bool
serviceName string
return bool

RunAsAdministrator() public method

public RunAsAdministrator ( ) : bool
return bool

SendServiceCommand() public method

public SendServiceCommand ( string serviceName, int command ) : void
serviceName string
command int
return void

StartService() public method

public StartService ( string serviceName, System.TimeSpan startTimeOut ) : void
serviceName string
startTimeOut System.TimeSpan
return void

StopService() public method

public StopService ( string serviceName, System.TimeSpan stopTimeOut ) : void
serviceName string
stopTimeOut System.TimeSpan
return void

UninstallService() public method

public UninstallService ( HostSettings settings, System.Action beforeUninstall, System.Action afterUninstall ) : void
settings HostSettings
beforeUninstall System.Action
afterUninstall System.Action
return void

WindowsHostEnvironment() public method

public WindowsHostEnvironment ( HostConfigurator configurator ) : System
configurator HostConfigurator
return System