C# 클래스 WebApplications.Utilities.Service.BaseService

상속: System.ServiceProcess.ServiceBase
파일 보기 프로젝트 열기: webappsuk/CoreLibraries 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
IsService bool

공개 메소드들

메소드 설명
Connect ( [ connection ) : System.Guid

Connects the specified connection.

Disconnect ( System.Guid id ) : bool

Disconnects the specified user interface.

Run ( RunMode runMode = RunMode.Default ) : void

Runs the service, either as a service or as a console application.

보호된 메소드들

메소드 설명
BaseService ( [ name, [ displayName, [ description, [ serverConfiguration = null ) : System

Initializes a new instance of the BaseService class.

DoContinue ( ) : void

When implemented in a derived class, M:System.ServiceProcess.ServiceBase.OnContinue runs when a Continue command is sent to the service by the Service Control Manager (SCM). Specifies actions to take when a service resumes normal functioning after being paused.

DoCustomCommand ( int command ) : void

When implemented in a derived class, M:System.ServiceProcess.ServiceBase.OnCustomCommand(System.Int32) executes when the Service Control Manager (SCM) passes a custom command to the service. Specifies actions to take when a command with the specified parameter value occurs.

DoPause ( ) : void

When implemented in a derived class, executes when a Pause command is sent to the service by the Service Control Manager (SCM). Specifies actions to take when a service pauses.

DoPowerEvent ( PowerBroadcastStatus powerStatus ) : bool

When implemented in a derived class, executes when the computer's power status has changed. This applies to laptop computers when they go into suspended mode, which is not the same as a system shutdown.

DoSessionChange ( System.ServiceProcess.SessionChangeDescription changeDescription ) : void

Executes when a change event is received from a Terminal Server session.

DoShutdown ( ) : void

When implemented in a derived class, executes when the system is shutting down. Specifies what should occur immediately prior to the system shutting down.

DoStart ( [ args ) : void
DoStop ( ) : void

When implemented in a derived class, executes when a Stop command is sent to the service by the Service Control Manager (SCM). Specifies actions to take when a service stops running.

비공개 메소드들

메소드 설명
BaseService ( ) : System

Initializes static members of the BaseService class.

Continue ( [ writer, CancellationToken token = default(CancellationToken) ) : Task
CustomCommand ( [ writer, [ command, CancellationToken token = default(CancellationToken) ) : Task
ExecuteAsync ( System.Guid id, [ commandLine, [ writer, CancellationToken token = default(CancellationToken) ) : Task
Help ( [ writer, [ command = null, [ parameter = null ) : void
Install ( [ writer, [ userName = null, [ password = null ) : void
Pause ( [ writer, CancellationToken token = default(CancellationToken) ) : Task
Performance ( [ writer, [ category = null ) : void
PowerEvent ( [ writer, [ powerStatus ) : bool
RunAsync ( RunMode runMode = RunMode.Default, CancellationToken token = default(CancellationToken) ) : Task
SessionChange ( [ writer, [ changeReason, [ sessionId ) : void
Shutdown ( [ writer ) : bool
StartService ( [ writer, [ args, CancellationToken token = default(CancellationToken) ) : Task
StopService ( [ writer, CancellationToken token = default(CancellationToken) ) : Task
Uninstall ( [ writer, CancellationToken token = default(CancellationToken) ) : Task

메소드 상세

BaseService() 보호된 메소드

Initializes a new instance of the BaseService class.
protected BaseService ( [ name, [ displayName, [ description, [ serverConfiguration = null ) : System
name [ The name.
displayName [ The display name.
description [ The description.
serverConfiguration [ The server configuration.
리턴 System

Connect() 공개 추상적인 메소드

Connects the specified connection.
public abstract Connect ( [ connection ) : System.Guid
connection [ The connection.
리턴 System.Guid

Disconnect() 공개 추상적인 메소드

Disconnects the specified user interface.
public abstract Disconnect ( System.Guid id ) : bool
id System.Guid The connection.
리턴 bool

DoContinue() 보호된 메소드

When implemented in a derived class, M:System.ServiceProcess.ServiceBase.OnContinue runs when a Continue command is sent to the service by the Service Control Manager (SCM). Specifies actions to take when a service resumes normal functioning after being paused.
protected DoContinue ( ) : void
리턴 void

DoCustomCommand() 보호된 메소드

When implemented in a derived class, M:System.ServiceProcess.ServiceBase.OnCustomCommand(System.Int32) executes when the Service Control Manager (SCM) passes a custom command to the service. Specifies actions to take when a command with the specified parameter value occurs.
protected DoCustomCommand ( int command ) : void
command int The command message sent to the service.
리턴 void

DoPause() 보호된 메소드

When implemented in a derived class, executes when a Pause command is sent to the service by the Service Control Manager (SCM). Specifies actions to take when a service pauses.
protected DoPause ( ) : void
리턴 void

DoPowerEvent() 보호된 메소드

When implemented in a derived class, executes when the computer's power status has changed. This applies to laptop computers when they go into suspended mode, which is not the same as a system shutdown.
protected DoPowerEvent ( PowerBroadcastStatus powerStatus ) : bool
powerStatus PowerBroadcastStatus A that indicates a notification from the system about its power status.
리턴 bool

DoSessionChange() 보호된 메소드

Executes when a change event is received from a Terminal Server session.
protected DoSessionChange ( System.ServiceProcess.SessionChangeDescription changeDescription ) : void
changeDescription System.ServiceProcess.SessionChangeDescription A structure that identifies the change type.
리턴 void

DoShutdown() 보호된 메소드

When implemented in a derived class, executes when the system is shutting down. Specifies what should occur immediately prior to the system shutting down.
protected DoShutdown ( ) : void
리턴 void

DoStart() 보호된 메소드

protected DoStart ( [ args ) : void
args [
리턴 void

DoStop() 보호된 메소드

When implemented in a derived class, executes when a Stop command is sent to the service by the Service Control Manager (SCM). Specifies actions to take when a service stops running.
protected DoStop ( ) : void
리턴 void

Run() 공개 메소드

Runs the service, either as a service or as a console application.
public Run ( RunMode runMode = RunMode.Default ) : void
runMode RunMode The run mode.
리턴 void

프로퍼티 상세

IsService 공개적으로 프로퍼티

Whether the service is running as a service.
public bool IsService
리턴 bool