private void CompileApplication() { // Get the Application Type and AppState from the global file _theApplicationType = BuildManager.GetGlobalAsaxType(); BuildResultCompiledGlobalAsaxType result = BuildManager.GetGlobalAsaxBuildResult(); if (result != null) { // Even if global.asax was already compiled, we need to get the collections // of application and session objects, since they are not persisted when // global.asax is compiled. Ideally, they would be, but since <object> tags // are only there for ASP compat, it's not worth the trouble. // Note that we only do this is the rare case where we know global.asax contains // <object> tags, to avoid always paying the price (VSWhidbey 453101) if (result.HasAppOrSessionObjects) { GetAppStateByParsingGlobalAsax(); } // Remember file dependencies _fileDependencies = result.VirtualPathDependencies; } if (_state == null) { _state = new HttpApplicationState(); } // Prepare to hookup event handlers via reflection ReflectOnApplicationType(); }
private void CompileApplication() { this._theApplicationType = BuildManager.GetGlobalAsaxType(); BuildResultCompiledGlobalAsaxType globalAsaxBuildResult = BuildManager.GetGlobalAsaxBuildResult(); if (globalAsaxBuildResult != null) { if (globalAsaxBuildResult.HasAppOrSessionObjects) { this.GetAppStateByParsingGlobalAsax(); } this._fileDependencies = globalAsaxBuildResult.VirtualPathDependencies; } if (this._state == null) { this._state = new HttpApplicationState(); } this.ReflectOnApplicationType(); }