2

I came across the nice explanation of :

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

HERE.

So I am more curious to know, when does the ApplicationShutdownMethod execute? As the code implies(below), the Shutdow() is disposing the UnityContainer instanse.

[assembly: WebActivatorEx.ApplicationShutdownMethod(typeof(UnityWebActivator), "Shutdown")]
    public static void Shutdown()
    {
        var container = UnityConfig.GetConfiguredContainer();
        container.Dispose();
    }    
Programmer
  • 121,791
  • 22
  • 236
  • 328
Bikram
  • 483
  • 6
  • 16

1 Answers1

0

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

Bikram
  • 483
  • 6
  • 16