C# Class WaveBox.WaveBoxService

Inheritance: System.ServiceProcess.ServiceBase
显示文件 Open project: einsteinx2/WaveBox Class Usage Examples

Public Properties

Property Type Description
TempFolder string

Public Methods

Method Description
WaveBoxService ( ) : System

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

Protected Methods

Method 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

Method 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 method

OnContinue does nothing yet
protected OnContinue ( ) : void
return void

OnPause() protected method

OnPause does nothing yet
protected OnPause ( ) : void
return void

OnShutdown() protected method

OnShutdown does nothing yet
protected OnShutdown ( ) : void
return void

OnStart() protected method

OnStart launches the init thread with the WaveBox Start() function
protected OnStart ( ) : void
return void

OnStart() protected method

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
return void

OnStop() protected method

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
return void

WaveBoxService() public method

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

Property Details

TempFolder public_oe static_oe property

public static string TempFolder
return string