C# Класс Dbot.Service.PrimaryService

Наследование: System.ServiceProcess.ServiceBase
Показать файл Открыть проект

Открытые методы

Метод Описание
PrimaryService ( ) : System

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

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

Защищенные методы

Метод Описание
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.

Описание методов

Dispose() защищенный Метод

Dispose of objects that need it here.
protected Dispose ( bool disposing ) : void
disposing bool Whether /// or not disposing is going on.
Результат void

OnContinue() защищенный Метод

OnContinue(): Put your continue code here - Un-pause working threads, etc.
protected OnContinue ( ) : void
Результат void

OnCustomCommand() защищенный Метод

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
Результат void

OnPause() защищенный Метод

OnPause: Put your pause code here - Pause working threads, etc.
protected OnPause ( ) : void
Результат void

OnPowerEvent() защищенный Метод

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.)
Результат bool

OnSessionChange() защищенный Метод

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.
Результат void

OnShutdown() защищенный Метод

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
Результат void

OnStart() защищенный Метод

OnStart(): Put startup code here - Start threads, get inital data, etc.
protected OnStart ( string args ) : void
args string
Результат void

OnStop() защищенный Метод

OnStop(): Put your stop code here - Stop threads, set final data, etc.
protected OnStop ( ) : void
Результат void

PrimaryService() публичный Метод

Public Constructor for WindowsService. - Put all of your Initialization code here.
public PrimaryService ( ) : System
Результат System

WriteExceptionDetails() публичный статический Метод

public static WriteExceptionDetails ( Exception exception, StringBuilder builderToFill, int level ) : void
exception System.Exception
builderToFill StringBuilder
level int
Результат void