C# 클래스 winsw.WrapperService

상속: System.ServiceProcess.ServiceBase, EventLogger
파일 보기 프로젝트 열기: kohsuke/winsw 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CopyFile void
HandleFileCopies void
HandleLogfiles void
InitLoggers void
ReadPassword string
SignalShutdownComplete void
SignalShutdownPending void
StartProcess void
StartThread void
StopIt void
ThrowNoSuchService void
WaitForProcessToExit void
printAvailableCommandsInfo void
printHelp void
printVersion void

공개 메소드들

메소드 설명
LogEvent ( String message ) : void
LogEvent ( String message, EventLogEntryType type ) : void
Main ( string args ) : int
Run ( string _args, winsw.ServiceDescriptor descriptor = null ) : void

Runs the wrapper.

WrapperService ( ) : System
WrapperService ( winsw.ServiceDescriptor descriptor ) : System

보호된 메소드들

메소드 설명
OnShutdown ( ) : void
OnStart ( string _ ) : void
OnStop ( ) : void

비공개 메소드들

메소드 설명
CopyFile ( string sourceFileName, string destFileName ) : void

File replacement.

HandleFileCopies ( ) : void

Process the file copy instructions, so that we can replace files that are always in use while the service runs.

HandleLogfiles ( ) : void

Handle the creation of the logfiles based on the optional logmode setting.

InitLoggers ( winsw.ServiceDescriptor d, bool enableCLILogging ) : void
ReadPassword ( ) : string
SignalShutdownComplete ( ) : void
SignalShutdownPending ( ) : void
StartProcess ( Process processToStart, string arguments, String executable ) : void
StartThread ( ThreadStart main ) : void

Starts a thread that protects the execution with a try/catch block. It appears that in .NET, unhandled exception in any thread causes the app to terminate http://msdn.microsoft.com/en-us/library/ms228965.aspx

StopIt ( ) : void

Called when we are told by Windows SCM to exit.

ThrowNoSuchService ( ) : void
WaitForProcessToExit ( Process processoWait ) : void
printAvailableCommandsInfo ( ) : void
printHelp ( ) : void
printVersion ( ) : void

메소드 상세

LogEvent() 공개 메소드

public LogEvent ( String message ) : void
message String
리턴 void

LogEvent() 공개 메소드

public LogEvent ( String message, EventLogEntryType type ) : void
message String
type EventLogEntryType
리턴 void

Main() 공개 정적인 메소드

public static Main ( string args ) : int
args string
리턴 int

OnShutdown() 보호된 메소드

protected OnShutdown ( ) : void
리턴 void

OnStart() 보호된 메소드

protected OnStart ( string _ ) : void
_ string
리턴 void

OnStop() 보호된 메소드

protected OnStop ( ) : void
리턴 void

Run() 공개 정적인 메소드

Runs the wrapper.
Any unhandled exception
public static Run ( string _args, winsw.ServiceDescriptor descriptor = null ) : void
_args string Arguments. If empty, WinSW will behave in the service mode. Otherwise - CLI mode
descriptor winsw.ServiceDescriptor Service descriptor. If null, it will be initialized within the method. /// In such case configs will be loaded from the XML Configuration File.
리턴 void

WrapperService() 공개 메소드

public WrapperService ( ) : System
리턴 System

WrapperService() 공개 메소드

public WrapperService ( winsw.ServiceDescriptor descriptor ) : System
descriptor winsw.ServiceDescriptor
리턴 System