/// <summary>Releases the kernel on application end.</summary> public void ShutDown() { if (KernelInstance != null) { KernelInstance.Components.GetAll <INinjectHttpApplicationPlugin>().Map(c => c.Stop()); KernelInstance.Dispose(); KernelInstance = null; } }