ApplicationShutdownMethod 什么时候调用?

When does ApplicationShutdownMethod called?

我看到了很好的解释:

[assembly: WebActivatorEx.PreApplicationStartMethod(typeof(xxx), "Start")]

HERE

所以我比较想知道,ApplicationShutdownMethod什么时候执行? 正如代码所暗示的(如下),Shutdow() 正在处理 UnityContainer 实例。

[assembly: WebActivatorEx.ApplicationShutdownMethod(typeof(UnityWebActivator), "Shutdown")]
    public static void Shutdown()
    {
        var container = UnityConfig.GetConfiguredContainer();
        container.Dispose();
    }    

"This code runs at the time Dispose is called on the last HttpModule in the app." 从 here.

复制的答案