Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » MobiLink - 服务器管理 » MobiLink 服务器 API » 使用 .NET 编写同步脚本 » 用于 .NET 参考的 MobiLink 服务器 API » ServerContext 接口

 

ShutdownListener 方法

语法
event iAnywhere.MobiLink.Script.ShutdownCallback 
  ShutdownListener(
  iAnwyhere.MobiLink.Script.ServerContext sc)
Member of iAnywhere.MobiLink.Script.ServerContext
注释

服务器关闭时将触发此事件。以下代码示例说明如何使用此事件:

ShutdownCallback callback = new ShutdownCallback(shutdownHandler);
_sc.ShutdownListener += callback; 

public void shutdownHandler(ServerContext sc) {
    _test_out_file.WriteLine("shutdownPerformed");
}