C# 클래스 Dbot.Service.PrimaryService

상속: System.ServiceProcess.ServiceBase
파일 보기 프로젝트 열기: destinygg/bot

공개 메소드들

메소드 설명
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