WebEventProvider.Shutdown 方法

定义

执行与关闭提供程序相关联的任务。Performs tasks associated with shutting down the provider.

public:
 abstract void Shutdown();
public abstract void Shutdown ();
abstract member Shutdown : unit -> unit
Public MustOverride Sub Shutdown ()

示例

下面的代码示例说明如何使用 Shutdown 方法。The following code example shows how to use the Shutdown method.


// Shutdown the provider.
public override void Shutdown()
{
    Flush();
}
' Shutdown the provider.
Public Overrides Sub Shutdown() 
    Flush()

End Sub

注解

ASP.NET 在承载 Web 应用程序的应用程序域终止时调用 Shutdown 方法。ASP.NET calls the Shutdown method when the application domain hosting the Web application terminates. 调用方法来执行允许应用程序正常结束的任务,例如关闭资源。The method is called to perform tasks that will allow the application to end gracefully, such as closing resources.

适用于