/// <summary> /// Disposes this and other auto-registered modules. /// </summary> public void Dispose() { // We should already have it if (moduleManager == null || moduleManager.Modules == null) return; moduleManager.DisposeModules(HttpContext.Current.ApplicationInstance); moduleManager = null; }
/// <summary> /// Gets the instance of <see cref="IHttpModuleManager"/> that is registered with the <see cref="IServiceLocator"/>. /// </summary> /// <returns>The registered <see cref="IHttpModuleManager"/>, otherwise a default <see cref="IHttpModuleManager"/> is used.</returns> protected virtual IHttpModuleManager GetModuleManager(IServiceLocator locator){ if (moduleManager == null) { lock (_lock) { if (moduleManager == null) { try { moduleManager = locator.Resolve<IHttpModuleManager>(); } catch { moduleManager = new HttpModuleManager(locator); } } } } return moduleManager; }