static HttpModule() { var serviceLocator = new AspNetServiceLocator(); Factory = new Factory(serviceLocator); serviceLocator.Logger = Factory.InstantiateLogger(); try { BuildManager.GetReferencedAssemblies(); serviceLocator.Logger.Debug("Preloaded all referenced assemblies with System.Web.Compilation.BuildManager.GetReferencedAssemblies()"); } catch (Exception exception) { serviceLocator.Logger.Error("Call to System.Web.Compilation.BuildManager.GetReferencedAssemblies() failed.", exception); } }
static HttpModule() { var serviceLocator = new AspNetServiceLocator(); Factory = new Factory(serviceLocator); ILogger logger = Factory.InstantiateLogger(); serviceLocator.Logger = logger; try { BuildManager.GetReferencedAssemblies(); serviceLocator.Logger.Debug("Preloaded all referenced assemblies with System.Web.Compilation.BuildManager.GetReferencedAssemblies()"); } catch (Exception exception) { serviceLocator.Logger.Error("Call to System.Web.Compilation.BuildManager.GetReferencedAssemblies() failed.", exception); } AppDomain.CurrentDomain.SetData(Constants.LoggerKey, logger); AppDomain.CurrentDomain.DomainUnload += (sender, e) => OnAppDomainUnload((AppDomain)sender); }
static HttpModule() { var serviceLocator = new AspNetServiceLocator(); Factory = new Factory(serviceLocator); serviceLocator.Logger = Factory.InstantiateLogger(); }