C# Class WaveBox.Service.ServiceManager

Datei anzeigen Open project: einsteinx2/WaveBox

Public Methods

Method Description
Add ( string name, bool autostart = false ) : bool

Add a new service, by name, to the manager, optionally starting it automatically

AddList ( IList names, bool autostart = false ) : bool

Add a list of services, by name, to the manager, optionally autostarting all of them

Clear ( ) : bool

Clear all currently registered services

GetInstance ( string name ) : IService
GetServices ( ) : IList

Return string list of registered services

RestartAll ( ) : bool

Attempt to restart all currently registered services

StartAll ( ) : bool

Attempt to start all currently registered services

StopAll ( ) : bool

Attempt to stop all currently registered services

Private Methods

Method Description
Start ( IService service ) : bool

Start and log the specified service

Stop ( IService service ) : bool

Stop and log the specified service

Method Details

Add() public static method

Add a new service, by name, to the manager, optionally starting it automatically
public static Add ( string name, bool autostart = false ) : bool
name string
autostart bool
return bool

AddList() public static method

Add a list of services, by name, to the manager, optionally autostarting all of them
public static AddList ( IList names, bool autostart = false ) : bool
names IList
autostart bool
return bool

Clear() public static method

Clear all currently registered services
public static Clear ( ) : bool
return bool

GetInstance() public static method

public static GetInstance ( string name ) : IService
name string
return IService

GetServices() public static method

Return string list of registered services
public static GetServices ( ) : IList
return IList

RestartAll() public static method

Attempt to restart all currently registered services
public static RestartAll ( ) : bool
return bool

StartAll() public static method

Attempt to start all currently registered services
public static StartAll ( ) : bool
return bool

StopAll() public static method

Attempt to stop all currently registered services
public static StopAll ( ) : bool
return bool