C# Class Dbot.Service.PrimaryService

Inheritance: System.ServiceProcess.ServiceBase
Afficher le fichier Open project: destinygg/bot

Méthodes publiques

Méthode Description
PrimaryService ( ) : System

Public Constructor for WindowsService. - Put all of your Initialization code here.

WriteExceptionDetails ( Exception exception, StringBuilder builderToFill, int level ) : void

Méthodes protégées

Méthode 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.

Method Details

Dispose() protected méthode

Dispose of objects that need it here.
protected Dispose ( bool disposing ) : void
disposing bool Whether /// or not disposing is going on.
Résultat void

OnContinue() protected méthode

OnContinue(): Put your continue code here - Un-pause working threads, etc.
protected OnContinue ( ) : void
Résultat void

OnCustomCommand() protected méthode

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.
protected OnCustomCommand ( int command ) : void
command int Arbitrary Integer between 128 & 256
Résultat void

OnPause() protected méthode

OnPause: Put your pause code here - Pause working threads, etc.
protected OnPause ( ) : void
Résultat void

OnPowerEvent() protected méthode

OnPowerEvent(): Useful for detecting power status changes, such as going into Suspend mode or Low Battery for laptops.
protected OnPowerEvent ( PowerBroadcastStatus powerStatus ) : bool
powerStatus PowerBroadcastStatus The Power Broadcast Status /// (BatteryLow, Suspend, etc.)
Résultat bool

OnSessionChange() protected méthode

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.
protected OnSessionChange ( System.ServiceProcess.SessionChangeDescription changeDescription ) : void
changeDescription System.ServiceProcess.SessionChangeDescription The Session Change /// Event that occured.
Résultat void

OnShutdown() protected méthode

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.
protected OnShutdown ( ) : void
Résultat void

OnStart() protected méthode

OnStart(): Put startup code here - Start threads, get inital data, etc.
protected OnStart ( string args ) : void
args string
Résultat void

OnStop() protected méthode

OnStop(): Put your stop code here - Stop threads, set final data, etc.
protected OnStop ( ) : void
Résultat void

PrimaryService() public méthode

Public Constructor for WindowsService. - Put all of your Initialization code here.
public PrimaryService ( ) : System
Résultat System

WriteExceptionDetails() public static méthode

public static WriteExceptionDetails ( Exception exception, StringBuilder builderToFill, int level ) : void
exception System.Exception
builderToFill StringBuilder
level int
Résultat void