/// <summary> /// Creates an instance of the <see cref="HttpQueryApplication"/> class. /// </summary> /// <returns> /// The newly created <see cref="HttpQueryApplication"/> object. /// </returns> public HttpQueryApplication CreateQueryApplication() { var background_thread_factory = new BackgroundThreadFactory(); var context = new Context(); var app = new HttpQueryApplication(settings_, context, background_thread_factory); return app; }
/// <summary> /// Creates an instance of the <see cref="HttpQueryApplication"/> class. /// </summary> /// <returns> /// The newly created <see cref="HttpQueryApplication"/> object. /// </returns> public HttpQueryApplication CreateQueryApplication() { var background_thread_factory = new BackgroundThreadFactory(); var context = new Context(); var app = new HttpQueryApplication(settings_, context, background_thread_factory); return(app); }
protected void Application_Start(object sender, EventArgs e) { string config_file_name = WebConfigurationManager.AppSettings[Strings.kConfigFileNameKey]; string config_file_path = Server.MapPath(config_file_name); Settings settings = new Settings.Loader() .Load(config_file_path, Strings.kConfigRootNodeName); var factory = new HttpQueryApplicationFactory(settings); factory.ConfigureLogger(); // log any unhandled exception that may occur for futher investigation. AppDomain.CurrentDomain.UnhandledException += (obj, args) => HttpQueryLogger.ForCurrentProcess.Error( string.Format(StringResources.Log_ThrowsException, "Application"), (System.Exception)args.ExceptionObject); HttpQueryApplication app = factory.CreateQueryApplication(); Application[Strings.kApplicationKey] = app; app.Start(); }