Exemplo n.º 1
0
 internal void InitSpecial(NetHttpContext context, NetHttpApplicationState state, NetHttpApplicationFactory factory, MethodInfo[] handlers)
 {
     _state   = state;
     _factory = factory;
     try
     {
         if (context != null)
         {
             _initContext = context;
             _initContext.NetApplicationInstance = this;
         }
         InitAppLevelCulture();
         if (handlers != null)
         {
             HookupEventHandlersForApplicationAndModules(handlers);
         }
     }
     finally
     {
         _initSpecialCompleted = true;
         if (_initContext != null)
         {
             _initContext.NetApplicationInstance = null;
             _initContext = null;
         }
     }
 }
Exemplo n.º 2
0
 internal void InitInternal(NetHttpWorkerRequest wr, NetHttpContext context, NetHttpApplicationState state, NetHttpApplicationFactory factory, MethodInfo[] handlers)
 {
     _state   = state;
     _factory = factory;
     try
     {
         _initContext = context;
         _initContext.NetApplicationInstance = this;
         InitModules(wr);
         if (handlers != null)
         {
             HookupEventHandlersForApplicationAndModules(handlers);
         }
         _context = context;
         if (_context != null)
         {
             _context.HideRequestResponse = true;
         }
         _hideRequestResponse = true;
         try { Init(); }
         catch (Exception exception) { RecordError(exception); }
         if (_context != null)
         {
             _context.HideRequestResponse = false;
         }
         _hideRequestResponse     = false;
         _context                 = null;
         _resumeStepsWaitCallback = new WaitCallback(ResumeStepsWaitCallback);
         _stepManager             = new ApplicationNetStepManager(this);
         _stepManager.BuildSteps(_resumeStepsWaitCallback);
     }
     finally
     {
         _initInternalCompleted = true;
         _initContext.NetApplicationInstance = null;
         _initContext = null;
     }
 }