Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Abstract class: RT.Services.SelfService

Summary

Encapsulates a Windows service hosted in a process that can install and uninstall its own services. Descendants should override ServiceBase.OnStart(string[]) and other similar methods. They should also set ServiceBase.ServiceName, display name, description etc. in the constructor.

Constructors

Initialises some parameters to their defaults, such as the name of the event log used by the service,

Instance methods

bool Starts this service. Returns true if the service state has been verified as running, or false otherwise. Will wait up to 5 seconds for the service to start. Does not throw any exceptions.
bool Stops this service. Returns true if the service state has been verified as stopped, or false otherwise. Will wait up to 5 seconds for the service to stop. Does not throw any exceptions. Note: if the service is running under the service host, in "service mode", use SelfService.StopSelf() instead.
void Used by the service to stop itself when running in service mode, under the service host.

Instance properties

stringDescribes what the service does. This is displayed by the service manager.
stringService name as displayed in the service manager. Can usually be used just like ServiceBase.ServiceName to refer to the service.
IList<string>List of service names that this service depends on. Display names are acceptable but discouraged, since they can be localised.
ServiceStartModeInitial service startup type. The user can change this through the service manager.