C# Class WaveBox.WaveBoxService

Inheritance: System.ServiceProcess.ServiceBase
Afficher le fichier Open project: einsteinx2/WaveBox Class Usage Examples

Méthodes publiques

Свойство Type Description
TempFolder string

Méthodes publiques

Méthode Description
WaveBoxService ( ) : System

Constructor for WaveBox service. Initializes the service and sets up the graceful shutdown

Méthodes protégées

Méthode Description
OnContinue ( ) : void

OnContinue does nothing yet

OnPause ( ) : void

OnPause does nothing yet

OnShutdown ( ) : void

OnShutdown does nothing yet

OnStart ( ) : void

OnStart launches the init thread with the WaveBox Start() function

OnStart ( string args ) : void

Override for OnStart from base service class. We don't need CLI args, so we just call our own

OnStop ( ) : void

OnStop stops the service, aborting the init thread, and terminating the program. This replaces the ShutdownCommon function, as this will be the exit of the program.

Private Methods

Méthode Description
InjectClasses ( ) : void

Perform dependency injection for all other classes in WaveBox

InjectPlatformSpecificClasses ( ) : void

Perform dependency injection for all classes which have platform-specific implementations

Main ( string args ) : void

Service entry point. Starts the WaveBox Service, which will then launch the application

RegisterShutdownHandler ( ) : void

Function to register shutdown handler for various platforms. Windows uses its own, while UNIX variants use a specialized Unix shutdown handler.

SetConsoleCtrlHandler ( EventHandler handler, bool add ) : bool
ShutdownUnix ( ) : void

Shutdown handler for UNIX systems, terminates WaveBox gracefully.

ShutdownWindows ( CtrlType sig ) : bool

Method Details

OnContinue() protected méthode

OnContinue does nothing yet
protected OnContinue ( ) : void
Résultat void

OnPause() protected méthode

OnPause does nothing yet
protected OnPause ( ) : void
Résultat void

OnShutdown() protected méthode

OnShutdown does nothing yet
protected OnShutdown ( ) : void
Résultat void

OnStart() protected méthode

OnStart launches the init thread with the WaveBox Start() function
protected OnStart ( ) : void
Résultat void

OnStart() protected méthode

Override for OnStart from base service class. We don't need CLI args, so we just call our own
protected OnStart ( string args ) : void
args string
Résultat void

OnStop() protected méthode

OnStop stops the service, aborting the init thread, and terminating the program. This replaces the ShutdownCommon function, as this will be the exit of the program.
protected OnStop ( ) : void
Résultat void

WaveBoxService() public méthode

Constructor for WaveBox service. Initializes the service and sets up the graceful shutdown
public WaveBoxService ( ) : System
Résultat System

Property Details

TempFolder public_oe static_oe property

public static string TempFolder
Résultat string