C# 클래스 GSF.Threading.ShutdownHandler

This class will monitor the state to the application and raise events when it detects that the application is about to shutdown.
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf 1 사용 예제들

공개 메소드들

메소드 설명
Initialize ( ) : void

Initializes the shutdown handler. This is recommended to put in main loop of the program, but it is not critical.

TryRegisterCallback ( System.Action callback, ShutdownHandlerOrder shutdownOrder = ShutdownHandlerOrder.Default ) : bool

Attempts Registers a callback that will be called when the application is shutdown.

비공개 메소드들

메소드 설명
InitiateSafeShutdown ( ) : void
InitiateSafeShutdown ( object sender, EventArgs e ) : void
ShutdownHandler ( ) : System

메소드 상세

Initialize() 공개 정적인 메소드

Initializes the shutdown handler. This is recommended to put in main loop of the program, but it is not critical.
public static Initialize ( ) : void
리턴 void

TryRegisterCallback() 공개 정적인 메소드

Attempts Registers a callback that will be called when the application is shutdown.
public static TryRegisterCallback ( System.Action callback, ShutdownHandlerOrder shutdownOrder = ShutdownHandlerOrder.Default ) : bool
callback System.Action the callback when the shutdown occurs
shutdownOrder ShutdownHandlerOrder the order that the callback will occur.
리턴 bool