Method | Description | |
---|---|---|
PrimaryService ( ) : System |
Public Constructor for WindowsService. - Put all of your Initialization code here.
|
|
WriteExceptionDetails ( |
Method | Description | |
---|---|---|
Dispose ( bool disposing ) : void |
Dispose of objects that need it here.
|
|
OnContinue ( ) : void |
OnContinue(): Put your continue code here - Un-pause working threads, etc.
|
|
OnCustomCommand ( int command ) : void |
OnCustomCommand(): If you need to send a command to your service without the need for Remoting or Sockets, use this method to do custom methods.
|
|
OnPause ( ) : void |
OnPause: Put your pause code here - Pause working threads, etc.
|
|
OnPowerEvent ( PowerBroadcastStatus powerStatus ) : bool |
OnPowerEvent(): Useful for detecting power status changes, such as going into Suspend mode or Low Battery for laptops.
|
|
OnSessionChange ( System.ServiceProcess.SessionChangeDescription changeDescription ) : void |
OnSessionChange(): To handle a change event from a Terminal Server session. Useful if you need to determine when a user logs in remotely or logs off, or when someone logs into the console.
|
|
OnShutdown ( ) : void |
OnShutdown(): Called when the System is shutting down - Put code here when you need special handling of code that deals with a system shutdown, such as saving special data before shutdown.
|
|
OnStart ( string args ) : void |
OnStart(): Put startup code here - Start threads, get inital data, etc.
|
|
OnStop ( ) : void |
OnStop(): Put your stop code here - Stop threads, set final data, etc.
|
protected Dispose ( bool disposing ) : void | ||
disposing | bool | Whether /// or not disposing is going on. |
return | void |
protected OnCustomCommand ( int command ) : void | ||
command | int | Arbitrary Integer between 128 & 256 |
return | void |
protected OnPowerEvent ( PowerBroadcastStatus powerStatus ) : bool | ||
powerStatus | PowerBroadcastStatus | The Power Broadcast Status /// (BatteryLow, Suspend, etc.) |
return | bool |
protected OnSessionChange ( System.ServiceProcess.SessionChangeDescription changeDescription ) : void | ||
changeDescription | System.ServiceProcess.SessionChangeDescription | The Session Change /// Event that occured. |
return | void |
public static WriteExceptionDetails ( |
||
exception | ||
builderToFill | StringBuilder | |
level | int | |
return | void |